Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 2 of 2 FirstFirst 12
Results 16 to 20 of 20
  1. #16
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,979
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    Quote Originally Posted by TestingPHP View Post
    oh, i compiled it on 15 & using 14 on my vps. (JDK).

    Could you compile it for me then?
    No, I use java 7. You'll should update both your JDK and JRE to Java 6.

    I'm still not sure exactly what you are getting at either with it. It simply won't respond if you don't accept anything from a client and write back to it. While it can be used to determine if the application is running on that port, it makes no guarantee about the state of an application on that port.

  2. #17
    New Coder
    Join Date
    Jun 2012
    Posts
    69
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Fou-Lu View Post
    No, I use java 7. You'll should update both your JDK and JRE to Java 6.

    I'm still not sure exactly what you are getting at either with it. It simply won't respond if you don't accept anything from a client and write back to it. While it can be used to determine if the application is running on that port, it makes no guarantee about the state of an application on that port.
    I know!

    On my CentOS Linux VPS The mirror only download/installs jdk 1.6.0.0_25 (yum install Java)

    How can I update that?

  3. #18
    New Coder
    Join Date
    Jun 2012
    Posts
    69
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ok On my VPS i have this version of Java JDK: java-1.6.0-openjdk-1.6.0.0-1.25.1.10.6.el5_8.x86_64

    Someone add me on msn & help me update please.

    peanuthitz@hotmail.co.uk

  4. #19
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,979
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    Follow this: http://wiki.centos.org/HowTos/JavaOnCentOS
    Go to the section on alternatives, and set the proper version of java. Then run the java -version and it should show up with the java 6.

  5. #20
    Banned
    Join Date
    Jun 2012
    Posts
    2
    Thanks
    0
    Thanked 1 Time in 1 Post

    listening on a port in java

    You will probably need to make use of Java sockets to do the port listening.

    Make a Server Socket Object at Server site and Wait till Clinet made a request

    ServerSocket ss=new ServerSocket(8000);

    Socket s=ss.accept(); // wait till client made request.....


    And Write Client Side

    Socket s=new Socket("IpAddressOfServer",8000);

    for a clear concept of how server listens to clients request, have a look at this link
    docs.oracle.com/javase/tutorial/networking/sockets/clientServer.html
    Last edited by WA; 06-27-2012 at 08:29 AM.


 
Page 2 of 2 FirstFirst 12

Posting Permissions

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