Mohamed Sanaulla | My Blog | Author of Java 9 Cookbook | Java 11 Cookbook
Probably because most computers have a JRE installed and in their PATH already. The JRE includes the "java" tool, so that is found, but it doesn't include "javac".Mohamed Sanaulla wrote: . . . And I am not sure why "javac" is not identified as a valid command whereas "java" is. . . .
Campbell Ritchie wrote:
Probably because most computers have a JRE installed and in their PATH already. The JRE includes the "java" tool, so that is found, but it doesn't include "javac".Mohamed Sanaulla wrote: . . . And I am not sure why "javac" is not identified as a valid command whereas "java" is. . . .
Mohamed Sanaulla | My Blog | Author of Java 9 Cookbook | Java 11 Cookbook
“Men are only as good as their technical development allows them to be.”
Joydeep Ghatak wrote:
1. Put the path as: C:\Program Files\Java\jdk1.6.0_23\bin; [ I mean the complete path where JDK is installed in your machine] at the beginning of the PATH environment variable, instead of using through JAVA_HOME, initailly
2. Then open a new command prompt window to check the 'java' and 'javac' command.
3. Also please check the 'Java' version that you have downloaded is for 32 bit or 64 bit and what is the architecture of your machine.
4. Also as per your post, you have set the 'JAVA_HOME' as 'User variables' and PATH is present in 'System variables' section.
I am not sure if there is any specific reason for you to put 'JAVA_HOME' as 'User variables', but my suggestion will be to put both JAVA_HOME and PATH under 'System variables' section.
Campbell Ritchie wrote:I have added a warning to the FAQ against using a user JAVA_HOME and a system PATH.
“Men are only as good as their technical development allows them to be.”
javac MyClass.java
java Myclass
Scott Allen wrote:Confirmed. C:\Program Files\Java\jdk1.6.0_23\bin contains javac.exe.
Thanks,
Scott
How to create your first Java program -JavaRange
Software Developer, Oracle Java Certification Training Labs at EPractize Labs.
Yes. Most probably because that is how you entered it into your PATH. Go back and edit your PATH.YiXi Zhang wrote:. . . So does Anyone knows why the dirtory name comes two times...
"Disappointing" and "Utterly Horrible" are not equal.
Once upon a time there were three bears. And they were visted by a golden haired tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|