Go Back   CodingForums.com > :: Server side development > Java and JSP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-13-2012, 06:15 PM   PM User | #16
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,653
Thanks: 4
Thanked 2,451 Times in 2,420 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
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.
Fou-Lu is offline   Reply With Quote
Old 06-13-2012, 06:39 PM   PM User | #17
TestingPHP
New Coder

 
Join Date: Jun 2012
Posts: 69
Thanks: 0
Thanked 0 Times in 0 Posts
TestingPHP is an unknown quantity at this point
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?
TestingPHP is offline   Reply With Quote
Old 06-13-2012, 06:50 PM   PM User | #18
TestingPHP
New Coder

 
Join Date: Jun 2012
Posts: 69
Thanks: 0
Thanked 0 Times in 0 Posts
TestingPHP is an unknown quantity at this point
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
TestingPHP is offline   Reply With Quote
Old 06-13-2012, 07:06 PM   PM User | #19
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,653
Thanks: 4
Thanked 2,451 Times in 2,420 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
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.
Fou-Lu is offline   Reply With Quote
Old 06-27-2012, 07:15 AM   PM User | #20
angelinwilliams
Banned

 
Join Date: Jun 2012
Posts: 2
Thanks: 0
Thanked 1 Time in 1 Post
angelinwilliams is an unknown quantity at this point
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..
angelinwilliams is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:10 AM.


Advertisement
Log in to turn off these ads.