I was messing around with writing Java code without an ide, and compiling/running with command prompt. When I try to create the .class, I get an error saying that Javac is not recognized. I was looking for answers when I found this thread
But nothing was working. I have done the following
It also should be noted that If I had the .class then
java Main.class will work
From the path you are using (
C:Program FilesJavajre1.8.0_51bin), it most likely is a JRE.
javac is part of the JDK.
Also, you should use a recent version of Java 8.