File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes How to make executable JAR file? 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 » Beginning Java
Bookmark "How to make executable JAR file?" Watch "How to make executable JAR file?" New topic
Author

How to make executable JAR file?

Edy Yu
Ranch Hand

Joined: Nov 21, 2000
Posts: 264
My dilemma is I can create a executable jar file.
But when I run it, it can't pick up the classpath setting.
But it gave me ClassDefNotFound exception when use some external classes.
Did anybody see the same problem?
Is there any way to solve it?
Thanks in advance.


<i><br />Sun Certified Programmer for Java 2 Platform (SCJP)<br />Sun Certified Developer for Java 2 Platform (SCJD)<br />Sun Certified Web Component Developer for Java2 Platform, Enterprise Edition (SCWCD)<br />Sun Certified Business Component Developer for Java2 Platform, Enterprise Edition (SCBCD)<br />Sun Certified Enterprise Architect for J2EE (SCEA)<br />IBM Certified Enterprise Developer, WebSphere Studio V5.0<br /></i>
Carl Trusiak
Sheriff

Joined: Jun 13, 2000
Posts: 3340
You can set the classpath in the manifest.
Class-Path : <urls>
The value of this attribute specifies the relative URLs of the extensions or libraries that this application or extension needs. URLs are separated by one or more spaces. The application or extension class loader uses the value of this attribute to construct its internal search path.


I Hope This Helps
Carl Trusiak, SCJP2, SCWCD
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to make executable JAR file?
 
Similar Threads
Executable jar
Stand alone project - working from desktop
is it possible to convert .class to .exe
Destop application
Problem in creating executable jar (Eclipse)