This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to make executable JAR file?

 
Edy Yu
Ranch Hand
Posts: 264
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Carl Trusiak
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic