This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes NoClassDefFoundError (HELP) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Beginning Java
Bookmark "NoClassDefFoundError (HELP)" Watch "NoClassDefFoundError (HELP)" New topic

NoClassDefFoundError (HELP)

Jason Travis

Joined: Feb 22, 2002
Posts: 14
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

Joined: Jun 13, 2000
Posts: 3340
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

Joined: Feb 22, 2002
Posts: 14
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

Joined: Jul 22, 2000
Posts: 9056
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 ]

"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Jason Travis

Joined: Feb 22, 2002
Posts: 14
%<some value>% is only for Win32 platform...this is to run on Win32, Solaris, HPUX, and AIX...
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: NoClassDefFoundError (HELP)
It's not a secret anymore!