I'm not sure what I'm doing wrong... I'm following several YouTube videos and I'm still unable to run my java program from the command prompt.
VERY first thing I did in cmd was:
set path="[copied URL to the JDK bin directory]"
Then I used 'cd' to get all the way to my homework directory, containing 4 java files.
Then I typed in 'javac hangman.java' to compile it... (Let's just say it was hangman)
Finally, I typed in 'java hangman'
And it says: "Error: Could not find or load main class hangman" inside my cmd.
What have I done wrong?
(I'm using Windows 10 if this somehow makes a difference.)
Copyright Notice:Content Author:「John Schwartz」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/35068877/unable-to-run-java-from-cmd