I have tried to compile a simple java program from tutuorial: class HelloWorldApp { public static void main(String[] args) { System.out.println("Hello World!"); } } It has compiled OK with "javac HelloWorldApp.java" and resulted a class file HelloWorldApp.class I wanted to run this class file with the following command: "java HelloWorldApp.class" , but instead of HelloWorld message I got the following: [root@paul /root]# java HelloWorldApp.class java.lang.NoClassDefFoundError: HelloWorldApp/class at java/lang/Throwable.<init>(37) at java/lang/Error.<init>(21) at java/lang/LinkageError.<init>(21) at java/lang/NoClassDefFoundError.<init>(21)
try 'java HelloWorldApp'