Link to home
Start Free TrialLog in
Avatar of peter_wu89
peter_wu89

asked on

hp_ux11.0 socket error of java1.4

I have install a hp_ux11.0 system with java1.4 package and the recommended patches for it. but I met a error when use socket of java1.4.  the error i got when ran is:  "java.net.SocketException: Socket closed "
  I wonder if there are other any critial patches need to be installed?

here is the simple test of socket:

1.<TestSocket.java>
import java.net.*;

class TestSocket{
     public static void main(String[] args){
         try{
          System.out.println("Listen the port 10240 ...");
          ServerSocket ss = new ServerSocket(10240);
          Socket s = ss.accept();
          System.out.println("Receive the request from " + s);        
                }catch(Exception ex){
          System.out.println(ex);
            }
     }
}


2.<Request.java>
import java.net.*;

class Request{
     public static void main(String[] a){
         try{
          Socket s = new Socket("localhost",10240);
         }catch(Exception ex){
              System.out.println(ex);
         }
     }
}



ASKER CERTIFIED SOLUTION
Avatar of JIEXA
JIEXA
Flag of Israel image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Also, this may happen by some weird and unknown reason (unknown for me) on HP-UX machines with multiple network interfaces (2 ethernet cards in addition to a loopback).
Avatar of peter_wu89
peter_wu89

ASKER

tks for your help, you comments is helpful, although
I have installed another version of HP_UX to fix it.
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is to:

Accept JIEXA's  comments as answer

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
st_steve
EE Cleanup Volunteer
Per recommendation.

YensidMod
EE Moderator