• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

NoClassDefFoundError on application Jar

 
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Guys,

Hope you can help. I've packaged up my project into a Jar file with the manifest.mf that reads:

Manifest-Version: 1.0
Class-Path: lib/fdsapi.jar lib/jakarta-oro-2.0.8.jar lib/JAMon.jar
Main-Class: parser.MainGUI

As you can see my application relies on three library jar files that reside in the lib directory. I've opened the jar file and the lib directory does exist there and the jar file are there also. When I use the commend java -jar pns.jar the application runs but it stalls when it is unable to locate a class that resides in one of the library jars. What more might I need to do to make sure these library jars wind up in the classpath?

Alan
 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The lib folder shouldn't be placed inside the JAR file, but in the same folder as the JAR file.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic