Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

`javac.exe` not found in the `jdk\bin`

I'm trying installing JDK on my Surface Pro 3, running 64-bit Windows 10.

As Authors of Core JAVA suggest, I installed JAVA at C:\Java\jdk1.8.0_72\, to avoid spaces in the path name. And I swear that I've installed a JDK(Downloaded from here), other than a JRE.

However, after setting the environment variable path, I opened Command Prompt, entered javac -version, and it told me 'javac' is not recognized as an internal or external command, operable program or batch file.. So I checked C:\Java\jdk1.8.0_72\bin\, and there is no executable file called javac.exe!

How can it be? And what I'm supposed to do now?

<code>jave -version works well, but</code>javac -version<code>does not.</code>

There is no <code>javac.exe</code>

Here is the CMD output when I ran dir under the jdk\bin:

Microsoft Windows [版本 10.0.10240]
(c) 2015 Microsoft Corporation. All rights reserved.

C:\Users\sqy>cd C:\Java\jdk1.8.0_72\bin

C:\Java\jdk1.8.0_72\bin>dir
 驱动器 C 中的卷没有标签。
 卷的序列号是 D611-8A7A

 C:\Java\jdk1.8.0_72\bin 的目录

2016/02/02  13:28    <DIR>          .
2016/02/02  13:28    <DIR>          ..
2016/02/02  13:28         1,182,304 awt.dll
2016/02/02  13:28            15,456 bci.dll
2016/02/02  13:28    <DIR>          client
2016/02/02  13:28           142,944 dcpr.dll
2016/02/02  13:28            63,584 decora_sse.dll
2016/02/02  13:28           451,168 deploy.dll
2016/02/02  13:28    <DIR>          dtplugin
2016/02/02  13:28            25,184 dt_shmem.dll
2016/02/02  13:28            21,600 dt_socket.dll
2016/02/02  13:28           109,152 eula.dll
2016/02/02  13:28           222,816 fontmanager.dll
2016/02/02  13:28           151,136 fxplugins.dll
2016/02/02  13:28           200,800 glass.dll
2016/02/02  13:28           400,992 glib-lite.dll
2016/02/02  13:28           514,656 gstreamer-lite.dll
2016/02/02  13:28           131,680 hprof.dll
2016/02/02  13:28           115,808 instrument.dll
2016/02/02  13:28            16,480 j2pcsc.dll
2016/02/02  13:28            51,296 j2pkcs11.dll
2016/02/02  13:28            19,552 jaas_nt.dll
2016/02/02  13:28            30,816 jabswitch.exe
2016/02/02  13:28            15,968 java-rmi.exe
2016/02/02  13:28           126,560 java.dll
2016/02/02  13:28           191,072 java.exe
2016/02/02  13:28           127,584 JavaAccessBridge.dll
2016/02/02  13:28           153,088 javacpl.cpl
2016/02/02  13:28            68,704 javacpl.exe
2016/02/02  13:28            57,440 javafx_font.dll
2016/02/02  13:28           444,000 javafx_font_t2k.dll
2016/02/02  13:28           126,048 javafx_iio.dll
2016/02/02  13:28           191,584 javaw.exe
2016/02/02  13:28           268,384 javaws.exe
2016/02/02  13:28            23,648 java_crw_demo.dll
2016/02/02  13:28            13,920 jawt.dll
2016/02/02  13:28            14,944 JAWTAccessBridge.dll
2016/02/02  13:28           163,936 jdwp.dll
2016/02/02  13:28            22,624 jfr.dll
2016/02/02  13:28           115,296 jfxmedia.dll
2016/02/02  13:28        33,926,240 jfxwebkit.dll
2016/02/02  13:28            15,968 jjs.exe
2016/02/02  13:28           158,816 jli.dll
2016/02/02  13:28           205,920 jp2iexp.dll
2016/02/02  13:28            77,920 jp2launcher.exe
2016/02/02  13:28            19,040 jp2native.dll
2016/02/02  13:28           173,152 jp2ssv.dll
2016/02/02  13:28           146,016 jpeg.dll
2016/02/02  13:28            16,480 jsdt.dll
2016/02/02  13:28            30,816 jsound.dll
2016/02/02  13:28            27,744 jsoundds.dll
2016/02/02  13:28           178,272 kcms.dll
2016/02/02  13:28            15,968 keytool.exe
2016/02/02  13:28            15,968 kinit.exe
2016/02/02  13:28            15,968 klist.exe
2016/02/02  13:28            15,968 ktab.exe
2016/02/02  13:28           185,952 lcms.dll
2016/02/02  13:28            33,376 management.dll
2016/02/02  13:28           574,560 mlib_image.dll
2016/02/02  13:28           455,328 msvcp120.dll
2016/02/02  13:28           773,968 msvcr100.dll
2016/02/02  13:28           970,912 msvcr120.dll
2016/02/02  13:28            79,968 net.dll
2016/02/02  13:28            51,296 nio.dll
2016/02/02  13:28            17,504 npt.dll
2016/02/02  13:28            16,480 orbd.exe
2016/02/02  13:28            15,968 pack200.exe
2016/02/02  13:28    <DIR>          plugin2
2016/02/02  13:28            15,968 policytool.exe
2016/02/02  13:28            52,832 prism_common.dll
2016/02/02  13:28           116,832 prism_d3d.dll
2016/02/02  13:28            86,112 prism_sw.dll
2016/02/02  13:28            14,944 resource.dll
2016/02/02  13:28            15,968 rmid.exe
2016/02/02  13:28            15,968 rmiregistry.exe
2016/02/02  13:28            15,968 servertool.exe
2016/02/02  13:28           177,248 splashscreen.dll
2016/02/02  13:28           462,432 ssv.dll
2016/02/02  13:28            51,808 ssvagent.exe
2016/02/02  13:28           124,000 sunec.dll
2016/02/02  13:28            25,696 sunmscapi.dll
2016/02/02  13:28           193,120 t2k.dll
2016/02/02  13:28            16,480 tnameserv.exe
2016/02/02  13:28            65,632 unpack.dll
2016/02/02  13:28           159,328 unpack200.exe
2016/02/02  13:28            39,520 verify.dll
2016/02/02  13:28            21,600 w2k_lsa_auth.dll
2016/02/02  13:28            95,840 WindowsAccessBridge.dll
2016/02/02  13:28           164,448 wsdetect.dll
2016/02/02  13:28            69,728 zip.dll
              85 个文件     46,209,264 字节
               5 个目录 150,936,281,088 可用字节

C:\Java\jdk1.8.0_72\bin>

Yea, I'm a Chinese, so there are some Chinese characters in the output. I've changed the default language to English, and they remain. However, you will still be able to get the information you need, I suppose.

like image 953
nalzok Avatar asked Feb 02 '16 06:02

nalzok


2 Answers

It is inside bin directory under your C:\Java\jdk1.8.0_72. Now you need to update your Environment variables and append C:\Java\jdk1.8.0_72\bin to the Path variable after semi colon. Important: do not delete the existing Path variable, just append C:\Java\jdk1.8.0_72

Now reopen the command prompt and type javac.

Edit: Could it be that when installer asked you where you want the JRE installed you pointed to the same dir where you told the installer to put JDK? In that case the installer will overwrite the content of bin of JDK by the content of bin of JRE.

like image 105
aviad Avatar answered Sep 23 '22 01:09

aviad


I have downloaded same file and changed install path assuming you also did it.

Same thing happened. Java installer installed a jre under the path i have choosen but also installed a jdk under C:\Program Files\Java\jdk1.8.0_72. Please check that.

I do not know why installer behaves like that but i think you can find javac under C:\Program Files\Java\jdk1.8.0_72\bin

like image 38
Ekrem Avatar answered Sep 25 '22 01:09

Ekrem