I'm sure this is a known problem, but I've just started playing with
Java on Linux.

  I'm using the JDK 1.1.5 v6 on a RedHat 4.1 system. When I tried to run Java
programs that worked successfully on Solaris, the programs didn't work - I got
exceptions thrown.

  Upon investigation, it appears that any read from a Socket throws an exception.
I used strace under Linux to get a trace and here's the partial result at the point
of error:

   write(5, "0", 1)                        = 1
   sigprocmask(SIG_BLOCK, NULL, [])        = 0
   read(5, 0x40822d50, 1)                  = -1 EAGAIN (Try again)
   open("./java/net/SocketException.class", O_RDONLY) = -1 ENOENT (No such file or 
directory)

Note that file descriptor 5 is the socket, and I've verified that the byte written 
with the
write() got to the remote host. I've also verified with tcpdump that the host sent me 
data,
which Java didn't read. It appears that once it gets the EAGAIN error, it generates a
SocketException (because it's attempting to open() the class file for that exception -
it eventually finds it in classes.zip).

  I can't believe that nobody noticed that socket input doesn't work, so I'm assuming 
this
is stupidity on my part as a new Linux user setting up Java Linux.

  Do I need a newer release of the Java port for Linux, a newer Linux kernel or a 
different
library?

  Thanks.


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to