Javac is not found
As far as I can see you have the JRE
in your PATH
, but not the JDK
.
From a command prompt try this:
set PATH=%PATH%;C:\Program Files (x86)\Java\jdk1.7.0_17\bin
Then try javac
again - if this works you'll need to permanently modify your environment variables to have PATH
include the JDK
too.
- Go to my computer;
- Right click properties;
- Go to advanced system settings;
- Go to environment variables;
- In user variables for user click on new(top new button, not on system variables);
- Set variable name as:
Path
- Set the value of that variable to:
C:\Program Files\Java\jdk1.7.0_76\bin
- Click ok;
- Click ok;
- Click ok.
Now you're set. Type javac
in cmd. All javac options will be displayed.
EDIT: As @MediaMaker pointed out, after completing the above steps, you need to open a new command prompt for it to work.
Easiest way: search for javac.exe in windows search bar. Then copy and paste the entire folder name and add it into the environmental variables path in advanced system settings.
I'm searched many answers that suggest me to type in cmd:
set path = "%path%;c:program files\java\jdk1.7.0\bin"
but this is WRONG!
the right solution is that you leave "set" and just type
path = %path%;c:program files\java\jdk1.7.0\bin
P/s: of course you have to replace "jdk1.7.0" folder by your current java version folder. This works well on win 7 32bit, but I think it also works on win 8 - try it!