0

I am realy close to solving this, but am having a little trouble setting up my Java command line prompt in windows 7. the funny thing is that I can use java & javac like this:

"%javac%"

Why is that ? I.e when I try to say javac *.java , it won't work; and even %javac% *.java won't work (ie it gives me "'java' is not recognized as an internal or external command,operable program or batch file -" ), but "%javac%" works; .. here is a SS of my "Envir. Variables" -

enter image description here

5
  • What happens when you type java -version ? Commented Jan 21, 2014 at 16:57
  • 1
    The quotes will interpret your %javac% variable. The reason javac *.java doesn't work is likely because you don't have JAVA_HOME in your PATH. Commented Jan 21, 2014 at 16:57
  • @admdrew - Hmm let me try that . thanks!! Commented Jan 21, 2014 at 16:57
  • @LittleChild - I get "'java' is not recognized as an internal or external command,operable program or batch file." Commented Jan 21, 2014 at 16:58
  • 1
    @Adel That is cause you dont have the bin in your path Commented Jan 21, 2014 at 16:58

1 Answer 1

2

Based on your comment that 'java' is not recognized as an internal or external command,operable program or batch file, you do not have jdk bin folder in your PATH environment variable. Add \path\to\jdk.version\bin to your PATH variable, preceded by a semicolon ;. You have to add, not overwrite the variable.

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

2 Comments

FYI, you probably should have mentioned the error - 'java' is not recognized as an internal or external command,operable program or batch file - in your original post...
@FoggyDay Made the edit to incorporate your suggestion. Thank you. =)

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.