10

When I work with the JDK, it says that javac is not recognized as an internal or external command. What shall I do? What is the path for jdk1.6.0_21?

1
  • I am running Windows 7 Ultimate 64 bits SP1. I installed jdk_7u4_windows_x64.exe - that is Java SE Development Kit 7 update 4 in 64 bits and Java FX 2.1 SDK. file location is c:\windows\system32\java.exe (185KB size) the folder path is c:\program file\java\jdk1.7.0.0_04 I also go to control panel/system/advance system setting/advance/environment variables/new variable name = JAVA_HOME variable value = c:\windows\system32\java.exe I download Android SDK installer_v18_windows.exe for windows 7 x64 bit and run, refused: Java SE Development kit (JDK) not found Still unable to install SDK so far. I
    – young707
    May 18, 2012 at 22:03

5 Answers 5

8

Depending on if you installed the 64-bit or 32-bit JDK it should be in:

  • 32-bit: C:\Program Files (x86)\Java\jdk1.6.0_21\bin
  • 64-bit: C:\Program Files\Java\jdk1.6.0_21\bin

You should be able to edit your PATH environment variable to include that path.

1

Well, went back, uninstalled all the JDK entries in control panel.

  • Load Java SE Development Kit 7 update 4 for Windows x 86 (32 bits) jdk-7u4-windows (even we are running Windows 7 Ultimate x64 bits SP1 system.)

  • Install this 32 bits JDK kit in c:\program files (x86)java\jdk1.7.0_04\

  • For the Android installation download installer_r18_windows.exe, then locate the Java SE folder at c:\program files (x86)\java\jre7\bin\java.exe

Conclusion: SDK only know the 32 bits JDK folder location even we are running Win 7 64 bit systems. The Program Files folder locations are different.

0

I found java version 1.7.0_21 in C:\Windows\SysWOW64.

It seems that Windows 7 64-bit redirects 32-bit programs you think are being installed into system32 into SysWOW64 - trouble is, the PATH environment variable is not updated to match.

0
0

The problem is that the OS is not able to find javac.exe for execution. So to point it in the right direction, you have to set the PATH environment variable.

In Windows 7, do the following:

  1. Right-click on My Computer and select Properties.

  2. From the window that appear select "Advanced system settings" (on the left side).

  3. Go to the Advanced tab and click on "Environment Variables".

  4. As heavyd mentioned, add those paths to the PATH variable by Editing it or clicking on New.

See this link for more information. It describes setting environment variables in a 32-bit environment, the only difference is the path itself.

-3

Windows 8.1 (64 bit)

C:\Program Files\Java\jdk1.8.0_45\bin

Include this path and you are all set to go.

2
  • stupid to post an answer when a better one is alrady there
    – barlop
    Jun 13, 2015 at 14:09
  • 1
    Q: "What is the path for jdk1.6.0_21?" Jun 13, 2015 at 15:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .