Results 1 to 3 of 3

Thread: Java Question(s)

  1. #1
    Join Date
    Sep 2006

    Java Question(s)


    I have been learning Java and know how to build simple applications. (I know about Applets, error handling, a bit of the API, etc.) However, what I am stumped on (sort of) is the networking part that I am now pursuing.

    First of all: when I try sun's socket tutorial it eventually leads to the server side java script where it creates a socket and listens to a certain port. HOWEVER, when I run this script on my machine it presents an error that it cannot listen to port 4444... I have forwarded this port, shut down all firewalls but to no avail.

    Anyway, thats not that big of a deal as my scripts will be running on a shared hosts and I won't have shell access so I won't be able to run a server side app (unless I had a browser pointed to the server-side applet on my shared host 24/7?? would this work? I still wouldn't want to do this as I cannot have my puter up 24/7.) Well, after looking at some java chat scripts, it seems that the ones that don't require you to run a server app constantly use PHP or another server side language to run the server instead... how would I do this?? I have been searching for some sort of tutorial on how to use Java and PHP together but to no avail.

    Also, how would I use MySQL with Java? I assume I could do it if I could use Java+PHP but I really am stumped there..

    If there is some tutorial explaining how this PHP as a server and Java as the client thing works please direct me towards that way, thank you,


  2. #2
    Join Date
    Jan 2007
    lookup JDBC. It lets you communicate to the database directly through Java.

  3. #3
    Join Date
    Mar 2007
    Have you tried a different port number? Perhaps there is already something running on that port.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center

Recent Articles