File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Sockets and Internet Protocols and the fly likes Application exit event while executing jar Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Application exit event while executing jar" Watch "Application exit event while executing jar" New topic

Application exit event while executing jar

Gurumoorthy Doraiswamy

Joined: Jan 15, 2013
Posts: 21
I have created an udp client in java and .NET server application. The problem is i get exception in the server that the "An existing connection is forcibly closed by remote host". This causes again the port un listened and no further packets arrive. when i googled it was mentioned that if the client is not closed properly then this issue might arise.
link :

i have used maven project with just classes with threads for processing and receiving.I have created a batch file to run the jar (java -cp) inside it. Can anyone suggest how to handle the exit event. Do we have something like Application.Exit event in .NET

I agree. Here's the link:
subject: Application exit event while executing jar