Win a copy of Spring Boot in Practice this week in the Spring forum!
  • 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
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

NoClassDefFoundError (HELP)

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello. I am having an issue regarding the -classpath option in Java 1.3. Specifically, I have an application which requires multiple jar files to be added to the class path...I have done so. However, I now get a NoClassDefFoundError for com.pervigil.<name of class>. Any help would be greatly appreciated. My command line looks like this...

java -classpath /lib/mail.jar:/lib/activation.jar:/libjakarta-regexp-1.2.jar:/lib/jconn2.jar:/lib/TRENDmon.jar com.pervigil.PVLmon
com.pervigil.PVLmon is located in the TRENDmon.jar file
Any help is greatly appreciated.
 
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is the directory structure? Where are you in relation to that when you exceute this?
You are specifying your classpath relative. Try using absolute paths to these files.
 
Jason Travis
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am one directory down from the directory structure where the jar files are located...I do not know how this will make a diffrence as the classpath option should ensure that we can execute this from any directory.
 
Sheriff
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How about
java -classpath %CLASSPATH%:root/lib/mail.jar:root/lib/activation.jar:root/libjakarta-regexp-1.2.jar:/lib/jconn2.jar:root/lib/TRENDmon.jar com.pervigil.PVLmon
??
[ April 22, 2002: Message edited by: Marilyn deQueiroz ]
 
Jason Travis
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
%<some value>% is only for Win32 platform...this is to run on Win32, Solaris, HPUX, and AIX...
 
reply
    Bookmark Topic Watch Topic
  • New Topic