0

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
.

2
Contributors
2
Replies
15
Views
3 Years
Discussion Span
Last Post by James_30
1

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.

Edited by JamesCherrill

0

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

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.