Non of the java programs which used to run fine in my computer has stopped running. There are no errors in da programs as they still run fine in other computers. All programs gives the folllowing error "Exception in thread "main" java.lang.NoClassDefFoundError"

I set my classpath and the path fine they are set as following :
CLASSPATH := C:\WINDOWS\System32\\C:\j2sdk1.4.0\bin\;%CLASSPATH%;
path := PATH = %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;C:\j2sdk1.4.0\bin

can some body please help me !!

Your classpath is wrong. It should point to the tools.jar file in your jdk directory. When you do this MAKE SURE that you add a period to the end of tools.jar like so:


tools.jar doesn't need to be (in fact shouldn't be) on the classpath.

What is missing from the classpath is the current directory ('.'). On older machines running Windows 9x that's no problem, on NT based and Unix based operating systems it's required.

tools.jar doesn't need to be (in fact shouldn't be) on the classpath.

Really? I've never been tought different, nor known different...Could you explain?

tools.jar is used internally by the JVM (like rt.jar). It knows where to find it as it knows where to find itself.

to the current directory (.) and any OPTIONAL libraries (so anything not included in the JVM installation itself).

There is an error in the classpath you have specified. You have a '\' after, you need a ';' (semi colon) there.

Like this:


thnak u every body for all ur support and time for analysiing my problem. and i am really happy to say the class path specified as :
came out to be a success. and i send a special thank to kate.

This article has been dead for over six months. Start a new discussion instead.