How to update Runtime?

G

Grzesiek

Hi,

In my program i have the lines:

Runtime.getRuntime().exec("java -jar app.jar");

/* Here is the code that changes app.jar*/

Runtime.getRuntime().exec("java -jar app.jar");

In the last line the old app.jar is invoked but i want the new one to
be invoked there. How can i update Runtime?

Thanx
 
R

Roedy Green

Runtime.getRuntime().exec("java -jar app.jar");

In the last line the old app.jar is invoked but i want the new one to
be invoked there. How can i update Runtime?

It will automatically pick the latest jar. The time you get in trouble
with old jars in Applets. You must restart the browser.

You can also say

App.main( xxxx);

If you want to run in the same JVM. This will start much more
quickly, but won't let you change the implementation on the fly.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,981
Messages
2,570,188
Members
46,731
Latest member
MarcyGipso

Latest Threads

Top