I would like to compile and execute a program in Java with Command Prompt but only compile the program: javac MyApp.java
Then I want to execute with that command: java MyApp
but it throws an error:
Error: Could not find or load main class MyApp
I think that is possible to be a problem with JRE or JDK configuration but I check the path, java -version
and 'Build path' in eclipse project but nothing. Any idea?