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
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: 56
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: 690
    
    1
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?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Not able to launch a JAR from another JAR