Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NoClassDefFoundError (HELP)

 
Jason Travis
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • 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.
 
Carl Trusiak
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
Marilyn de Queiroz
Sheriff
Posts: 9065
12
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
%<some value>% is only for Win32 platform...this is to run on Win32, Solaris, HPUX, and AIX...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic