Pages

Monday, July 1, 2013

Check java jar application is already running.

ServerSocket ss;
try {
    ss = new ServerSocket(MY_PORT);
    // not already running.
} catch (BindException e) {
    // already running.
}
 
Steps.
 
1) open listning port.
2) check listning port alredy runnig. 

Good luck.

No comments:

Post a Comment