aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes close running instance of application when install new version 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 » Swing / AWT / SWT
Bookmark "close running instance of application when install new version" Watch "close running instance of application when install new version" New topic
Author

close running instance of application when install new version

Anuj Joshi
Greenhorn

Joined: Feb 05, 2009
Posts: 22
Hi...

I have written code to install an software.
When I start installation, it will firstly check whether that software is already installed or not. if it is already installed then
it will check whether that software is running or not.

If that software is not running then it will uninstall the previously installed software & then it will install the new version.

now my problem is, when old version software application is running & i m trying to install new version then pop-up of message is shown that,
"instance of old version software is running, please click on OK button to close the running instance."

by using socket I have checked whether software is running or not.

but how can I close the running instance, so after that installation of the new version continues.
when I click on OK button then old version aplication instance should get close & whatever I am installing that should continue.



Please give me solution that how I can do this.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19672
    
  18

In the running application, you will need to accept a socket, listen for some special message, and then close it if the right message has been sent. What that message looks like is up to you.

In pseudo code:


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
wood burning stoves
 
subject: close running instance of application when install new version