I just created a .java file.
(my IDE is NetBeans, java version java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode))
I want to compile it and then execute it from windows CMD because of the command line arguments. So i write on CMD: javac className.java and everything works as expected. After that i write the command: java className and this error pops out on CMD: Error: Could not find or load main class AlgorithmsProject
Now on docs.oracle.com it says clearly on Common Problems:
"A common mistake made by beginner programmers is to try and run the java launcher on the .class file that was created by the compiler. For example, you'll get this error if you try to run your program with java HelloWorldApp.class instead of java HelloWorldApp. Remember, the argument is the name of the class that you want to use, not the filename"
Obviously i write and the className only and it gives me the same ERROR.
On youTube some videos show that you have to write the following commands on CMD:
set path="C:\Program Files\Java\jdk1.8.0_101\bin";
set classpath="C:\Program Files\Java\jre1.8.0_101\lib\rt.jar";
and the same error still pops out.
Any suggestions?