dcsimg
NoClassDefFoundError
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Friday, October 5, 2001 12:37 PM

Hi, I am using RedHat7.0. I download jdk1.3.1 and put into /usr/java/jdk131 directory. I set the PATH and CLASSPATH variables. Then, I write a java program and it compiles fine. But when I try to run it , it gives the following Exception Exception in thread "main" classNotFoundException: SimpleParse I have CLASSPATH=/usr/tomcat/common/lib/servlet.jar:/usr/tomcat/common/lib/xerces.jar:/usr/tomcat/common/lib/xml4j.jar I tried using the -cp option, i.e., java -cp $CLASSPATH SimpleParse first.xml I still get the same message. I copy all necessary files to that directory and run it. Same problem happened.    More>>

Hi,



I am using RedHat7.0. I download jdk1.3.1 and put into /usr/java/jdk131 directory.
I set the PATH and CLASSPATH variables. Then, I write a java program and it compiles fine.
But when I try to run it , it gives the following Exception




Exception in thread "main" classNotFoundException: SimpleParse

I have
CLASSPATH=/usr/tomcat/common/lib/servlet.jar:/usr/tomcat/common/lib/xerces.jar:/usr/tomcat/common/lib/xml4j.jar



I tried using the -cp option, i.e.,


java -cp $CLASSPATH SimpleParse first.xml



I still get the same message. I copy all necessary files to that directory and run it. Same problem happened.



What should I do to solve this problem?
Help will be very much appreciated.



Thanks in advance




Fred Chen

fred@hypertechusa.com

   <<Less

Re: NoClassDefFoundError

Posted By:   Anonymous  
Posted On:   Friday, October 5, 2001 01:01 PM

Hi everyone,



Thank you for Cheun N Chong's question same like mine.


I miss the "." in my CLASSPATH.

CLASSPATH=.:/usr/tomcat/...


After I add in, I can run the program with no problem. Thanks.
About | Sitemap | Contact