0

I am running on a Windows 7 machine.

I installed Java jdk 1.7.

I have set the Path and PATH environment variable to point to the Java jdk 1.7/bin directory.

Executing java -version in the command prompt yields Java version 1.7.0_45.

However when I execute javac it says that:

javac is not recognized as an internal or external command

I am really stumped on this problem. All other threads seem to get similar issues resolved via changing the environment variable but this is not solving my problem in this situation.

Edit

When I run java -version in Console2 it says that the currently used version of Java is 1.6 and I am not sure why this is the case.

8
  • Sharing you PATH variable value is a good idea to have 5his fixed asap. Commented Dec 23, 2013 at 6:43
  • C:\Program Files\Java\jdk1.7.0_45 \bin Commented Dec 23, 2013 at 6:45
  • 1
    Sounds like some problem with your path most likely. Try running where java. Is the java program being executed from where you expect? Commented Dec 23, 2013 at 6:53
  • I've also had trouble in the past when I've had the path set to contain two different version of the same named file. And guessing you know this, but be sure to close the cmd prompt and reopen it whenever you make changes to the path to make sure it follows those changes. Commented Dec 23, 2013 at 7:00
  • running from C:\Windows\System32\java.exe I am expecting this to have run from program files...... plus it is a 64 bit machine Commented Dec 23, 2013 at 7:01

2 Answers 2

1

Not sure if this is the cause, but in the path you posted

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

Looks like an extra space in between of "jdk1.7.0_45" and "\bin"

Also it's always good to append ";" at the end.

PATH = C:\Program Files\Java\jdk1.7.0_45\bin;

Sign up to request clarification or add additional context in comments.

Comments

0

Chnage it to C:\Progra~1\Java\jdk1.7.0_45\bin and it shall work like magic :)

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.