When you get error
couldnot find or load main class HelloWorldApp.
The Actual issue is it cannot find the class you have compiled.
This also can happen if your class name is different than you are trying to run. Many times we save the file with name that is different from class name. and then try to run the name of file than the class.
Here is what you can do:
1) Traverse till the path in command prompt where your HelloWorldApp.java file is saved. For example, Mine is at path "D:/JAVA_PROJECT/HelloWorldApp.java"
I will traverse till "D:/JAVA_PROJECT/" in command prompt will look like this
D:\JAVA_PROJECT
2) Type command to compile your code to create class (Remember, You should save your file with the name of your class, because compilation will always happen with JAVA CLASS NAME)
D:\JAVA_PROJECT\javac HelloWorldApp.java
After that hit enter
Now if you will go to the folder where you have saved your HelloWorldApp.java, you will see a file HelloWorldApp.java, this is your main class for which you are getting error
couldnot find or load main class HelloWorldApp.
Now if you follow thrid step, you will see the output of your class
3)
D:\JAVA_PROJECT\java HelloWorldApp
Hit enter and bang!! there will be your output.
Other answers are quite better than mine.. But i thought i should provide information about the error you are getting.
I hope this will help