What is a goodway to code a btn ation. To inialize adeaktop app from another desktop app. More over,run thejar use a eclipes build.xml . I built both apps in netbeans environment
.

Recommended Answers

You want to run an app in another jar when a button is clicked?

The easiest way is to use the Desktop class which can open a file in its default application - if you open the other jar file then the default will be to run it using javaw. …

Jump to Post

All 2 Replies

You want to run an app in another jar when a button is clicked?

The easiest way is to use the Desktop class which can open a file in its default application - if you open the other jar file then the default will be to run it using javaw. It's as easy as:

desktop = Desktop.getDesktop();
File JarFile = new File(thePathAndNameOfTheJarFile);
desktop.open(JarFile);

It doesn't make the slightest difference whether you use NetBeans, Eclipse, or any other development tools. A jar is a jar.

Thanks i will have to work. with that to understand it more.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.