Strange launch problem using command prompt
I just moved to windows and have a strange problem when trying to run the application. Everytime I run a package, instead of simply writing "java Package.ClassFile" I have to write "java -classpath . Package.ClassFile". Otherwise I get NoClassDefFoundError. Why is it so? I set PATH to the bin folder in my java jdk. Also set JAVA_HOME to the jdk folder as well. JRE_HOME as well to the folder where it is located.
Re: Strange launch problem using command prompt
I'm not sure. Long time since I set up my environment.
Is the system's classpath environment variable set? Does it have a . in it?
Re: Strange launch problem using command prompt
Oh, now I get it. I had set the CLASSPATH to servlet-api.jar. After deleting this variable everything is alright.