I'm currently studying for Chapter 1 of the OCAJP Study Guide Chapter 1 and I'm currently stuck in compiling a Java Program in Command Prompt or CMD. I tried to follow the example of the Zoo class but when I tried to run and compile the Zoo class in the CMD by typing javac Zoo.java, the message says that "javac is not recognized as an internal or external command, operable program or batch file.
Upon checking, I have JRE installed on my computer. Please help me figure out how can I run a sample java program in the Command Prompt. Thank you and I look forward to any helpful response.
How do you know that OP didn't download the JDK? It is more common to see that error message because you have installed the right thing but not set the system PATH correctly. See our FAQ. If you use Windows®10 and you get the PATH elements in a dropdown list in ttheir own window, make sure to give each PATH element a line to itself.