I have no idea how to get the error message you were getting.
Type: Posts; User: Norm
I have no idea how to get the error message you were getting.
You are repeating yourself. I asked that you do a dir command and a java -version command when you do the other commands.
Can you do those extra commands and post the output here?
If you don't...
If you don't run the commands I asked for and post the contents of the command prompt window when you are done, I can't help you. I'm here and you are there with your PC. The only way I can see...
Where is the dir command output?
Also enter: java -version
Also show the contents of the Prg1.java file
Can you post what is shown in a command prompt for the dir command and the java command.
I can't find a way to generate the error message you show when using the java command:
Error: Could not...
The OS is finding the javac and the java commands. Otherwise there'd be error messages.
The javac command did not give an error. What .class files are there in the Core Java codes folder?
Do a dir...
Where is the class Program1?
The code you posted has a class named: Prg1
You should use that name when executing the java command: java Prg1
Does the program have a package statement?
If so you must consider it when using the java command.
For simple program testing, comment out the package statement and try again.