wood burning stoves*
The moose likes Beginning Java and the fly likes Create Executable Jar File With User Library Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Create Executable Jar File With User Library" Watch "Create Executable Jar File With User Library" New topic
Author

Create Executable Jar File With User Library

raja patil
Greenhorn

Joined: May 26, 2008
Posts: 24
Hi,

I am Experienced Delphi GUI Prgrammer,
I have Created a test Application Using
Eclipse, Windows Builder Pro, Openswing.

The application Runs From Eclipse Well Then
I exported it to Jar and Expected That it will
run with java -jar ???.Jar but it wont run
and gives excetion about Openswing Jars.

How can I package my application with all the jars
required in a single jar/zip file which can be
put a single directory on target client and
will run with double clicking a main application Jar file

BTW the working platform is Windows XP and Target Platform
can be either Windows or Linux.

Raja S Patil
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38075
    
  22
Welcome to JavaRanch

I always seem to have problems with jars myself. I presume you have set a "main" class when you created the jar from Eclipse. I presume you have had to add Openswing to the classpath with the "use external jars" command on Eclipse.

Please go through the Java Tutorials about "deployment", and find the bit about adding to the classpath; then you can put Openswing into the same folder and the new classpath will allow it to find it.

There is a cheat's way of putting a jar into the classpath, which is to move an openswing folder into the package structure.Try executing the main method from such a folder structure. It is in theory possible to add the classes in the openswing folder to the jar with the updating commands (see the tutorial link I posted above), but I have never tried myself.
[ May 26, 2008: Message edited by: Campbell Ritchie ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Create Executable Jar File With User Library
 
Similar Threads
Multiple jar declaration in Class-Path attribute in jar's Manifest file
Exporting to jar file in eclipse
some JAR problems.
JAR file compile and execution error - NoClassDefFoundError
Eclipse JARing