I created a server class with ServerSocket, and run it on Linux (in daemon), however, when the Linux is rebooted, the client side could not feel it. It is still pending at "read" method instead of -1 returned from the method. It works when it is not run in daemon. Why?
author and iconoclast
I'm not sure what running "in daemon" means -- automatically? Via inetd? In the background?
You can use "telnet" on the Linux machine to talk directly to your server program; that might be a good way to debug this:
telnet localhost port
(where port is the port number you are trying to run the server on.) Does this connect? Does it respond the way you expect if you type something? Until this works, you're obviously not going to be able to use the Java client.