Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Javac is not found

I'm running Windows 8 and I can not get javac to work.

I have set my PATH in environmental variables to

C:\Program Files (x86)\Java\jdk1.7.0_17\bin

I have tried both with and without ';' but to no avail.

I recently had this issue on my desktop and adding ; worked but it's not in this case.

I have made sure that javac does exist in the bin too.

Any suggestions on fixes would be greatly appreciated.

EDITS echo %PATH% gives:

C:\Users\Arktri\Desktop>echo %PATH%  C:\Program Files (x86)\Intel\iCLS Client\; C:\Program Files\Intel\iCLS Client\; C:\Windows\system32;C:\Windows; C:\Windows\System32\Wbem; C:\Windows\System32\WindowsPowerShell\v1.0\; C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86; C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64; C:\Program Files\Intel\Intel(R) Management Engine Components\DAL; C:\Program Files\Intel\Intel(R) Management Engine Components\IPT; C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL; C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;; C:\Program Files (x86)\Java\jre7\bin 

And the exact error is: 'javac' is not recognized as an internal or external command, operable program or batch file.

like image 698
Arktri Avatar asked Mar 22 '13 16:03

Arktri


People also ask

Why javac is not working?

You must have your $JAVA_HOME/bin directory added to system PATH for javap command to be available without it's absolute path. Show activity on this post. Assuming you are on Windows, check in your environment variable PATH whether path to Java executables is set.

Is javac available in JRE?

The JRE doesn't have javac - you need to download the JDK (Java Development Kit).

Where is javac compiler located?

The value that you want to add is most likely C:\Program Files\Java\jdk-14.0. 2\bin if you are installing "JDK 14.0. 2". This is the location where the Java compiler ('java.exe') was installed in your file system.


1 Answers

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.

like image 136
Sean Landsman Avatar answered Oct 07 '22 18:10

Sean Landsman