Classpath problems
Hi, Java ppl.
I am having this strange problem, I am trying to compile a servlet and for this I set the classpath to point to jsdk.jar and then when I try to run any java program it gives a NoSuchMethodDefFound error. and also to execute/compile a class from a package gives a compile time error saying unidentified symbol. I have the files in proper directories. I am using jdk1.3 on a win98 machine.
Any help.....
Pradeep
[462 byte] By [
pra_sethi] at [2007-9-26 4:06:15]

you have a classpath problem. You don't include enough in your classpath. I would suggest you add or modify your existing classpath variable in your "autoexec.bat" file. So just make sure you include the paths to every single package you're using in your program, including the dot ( "." ) for classes in the currently working directory. Below is an example:
SET CLASSPATH=.;e:\jdk1.3.1\jre\lib\rt.jar;e:\jdk1.3.1\lib\tools.jar;c:\j2sdkee1.3\lib\j2ee.jar;c:\j2sdkee1.3\lib\locale;e:\javamail\javamail-1.2\mail.jar;e:\javamail\jaf-1.0.1\activation.jar;c:\jdbc\mm.mysql\mm.mysql-2.0.2\mysql.jar;c:\jswdk-1.0.1\lib\servlet.jar;c:\jswdk-1.0.1\lib\jsp.jar;%classpath%
Hope that answered your question.
jln7 at 2007-6-29 13:06:22 >

your problem is in CLASSPATH setting.
Please also check the solution I posted in the following links
http://lists.w3.org/Archives/Public/www-jigsaw/2001JulAug/0044.html. By comparing with those steps, you will be confident with some steps, then focus on the problems.
Hope this helps!
Did the programs work properly before you set the CLASSPATH?
I don't think this is a CLASSPATH problem because the class has been found. Instead, looks like after the CLASSPATH has been set there are different packages available than the ones you expect.
If you are compiling from a batch file try restoring the CLASSPATH after the work is done.
Good luck!