• Post Reply Bookmark Topic Watch Topic
  • New Topic

Restaring Process!  RSS feed

 
Jiss Elizabeth
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a java application which is connecting to server via Sockets. I need to add a restart feature which after System.exit(0) restarts the whole process again. If i try without a System.exit(0) it says

-------------
ClientServerSocket::acceptConnections: Address already in use
bind: network problem

How can i run the code which comes after System.exit(0) or is there a way to implement this?

Thank You!
 
Rob Spoor
Sheriff
Posts: 20898
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'll need to close the ServerSocket.
 
Jiss Elizabeth
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, that worked!
Thank you
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!