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.