I installed java on my machine and I wanted to compile this group of source code. But when I opened up the command prompt and typed in javac, the command prompt said it was an unknown parameter. The same thing happened when I wanted to build something with ant (I had the build.xml if you are wondering) and the same thing happened. How can I set the javac and ant command to be used in any directory?
Share
First of all you have to be sure you installed JDK and not only JRE
Secondly it depends on your operating system:
Then you need to set two things:
One note: on OSX, and maybe Linux too you have to split paths in PATH variable with double colon ‘:’ instead that semicolon ‘;’