4

I've been trying to setup javac, but I keep getting the dreaded error message

javac is not recognized as an internal or external command, operable program or batch file

Ive added the location of javac (C:\Program Files\Java\jdk1.7.0_17\bin) to the Path in Environment Variables.. restarted the console etc, but the error persists. Am I missing something here?

seeker
  • 6,421
  • 22
  • 62
  • 98

2 Answers2

26

I had the same issue as yours and I've fixed like this:

In the system variables I made a new variable, called it JAVA_HOME, and I set the value to: C:\Program Files\Java\jdk1.7.0_17. After that, I edited Path, which is also in the system variables and I added : ;%JAVA_HOME%\bin.

I hope it will help you !

Survivor
  • 634
  • 7
  • 12
1

The space in the path in Program Files is suspicious. Did you put this portion of the path in quotes?

You can also try where javac to see which javac is on the path. However, in this case, doesn't sound like it's getting picked up on the path anyway (it will probably also report that javac cannot be found).

John McCarthy
  • 5,464
  • 2
  • 28
  • 40