File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes Not able to launch a JAR from another JAR Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Not able to launch a JAR from another JAR" Watch "Not able to launch a JAR from another JAR" New topic
Author

Not able to launch a JAR from another JAR

Praveen Kumar Jayaram
Ranch Hand

Joined: Jul 14, 2008
Posts: 54
Hi,

I have a swing application. On click of a button I am launching another JAR file.
This works fine if I run the application from IDE (Netbeans 6.0).
The application when I run from the application's JAR, it won't launch another JAR... It will hang.

Is this because of classpath problem??
Even I created a env var: CLASSPATH and making this var point to another JAR.
This did not help.

Any suggestion?

Regards,
Praveen


Praveen
Norm Radder
Ranch Hand

Joined: Aug 10, 2005
Posts: 685
launching another JAR file

Does the above mean start another application on the OS? by using Process and Runtime. The commandline being: java -jar <jarfile>
Is <jarfile> the full path to the jar file?
If not, where is the current directory for the java command execution?
 
wood burning stoves
 
subject: Not able to launch a JAR from another JAR
 
Similar Threads
cp not being recognised
Accessing class in jar
jdbc program written in Eclipse3.2.1 to connect DB2
Application not running from jar
Run JAR file in Applet