This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Sockets and Internet Protocols and the fly likes ServerSocket problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "ServerSocket problem" Watch "ServerSocket problem" New topic

ServerSocket problem

fedai gandjaliyev
Ranch Hand

Joined: Dec 05, 2005
Posts: 99
I write a class which listens to connections with ServerSocket.
When using an IDE (say IntelliJ IDEA) the ServerSocket works because
I launch the process of the class.
When terminating the process and putting the class file somewhere
on a remote machine the Exception says that the socke is closed.
When placing on a remote machine how can I make the class file (
with ServerSocket) listen to incoming connections?

Thank you!
Joe Ess

Joined: Oct 29, 2001
Posts: 8836

Stupid question: Are you running the class on the remote server?
Are you changing the IP address in the client of the server it is trying to reach from your local machine to the remote machine?

"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
It is sorta covered in the JavaRanch Style Guide.
subject: ServerSocket problem
Similar Threads
Applet serversocket problem
Why won't my socket connect?
Startup class problem..HELP
Startup class problem
Maximum Number of Sockets