I tried the following in cl:
javac Main.java
The shell gives an error that "javac" is not a recognized command. I know for a fact I have the Java Platform installed. What could be wrong?
(I use "cd" to set the directory first)
javac is most likely not on the PATH, and you must give the full path in your command.
c:/path/to/jdk/bin/javac.exe Main.java. But better is to add c:/path/to/jdk/bin to %PATH% environment variable so that you don't need to enter the full javac path everytime.%JAVA_HOME%\bin\javac.exe Main.java.Add /bin folder to your environment variables.