-2

I've downloaded and installed Java SE Development Kit 8, but when I type

javac -version

into Windows Command Prompt, it tells me,

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

I tried running Command Prompt as administrator, but it made no difference.

I have no idea why the command is not working, knowing my luck it's something really basic.

default locale
  • 13,035
  • 13
  • 56
  • 62
Anna B
  • 3
  • 2
  • Have you checked environment settings? Check out this answer: http://stackoverflow.com/a/10046715/451518 – default locale Jan 15 '15 at 06:45
  • possible duplicate of [javac not working in windows command prompt](http://stackoverflow.com/questions/1678520/javac-not-working-in-windows-command-prompt) – nhahtdh Jan 15 '15 at 06:45

2 Answers2

0

You can add the java bin directory (e.g. C:/Program Files/Java/jdk1.7.0_72/bin) to the path variable. Here is a description on how to do that: https://www.java.com/en/download/help/path.xml

flavio.donze
  • 7,432
  • 9
  • 58
  • 91
-1

You have to check if the folder of your JDK is in the path variable of the system variables. To see that, go to System in Control Panel and check your environment variables. If you have a problem tell me which version of Windows you use.

Magnilex
  • 11,584
  • 9
  • 62
  • 84
  • This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient [reputation](http://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](http://stackoverflow.com/help/privileges/comment). – DavidPostill Jan 15 '15 at 07:10
  • Sorry for the mistake. It will not happen again – Paolo Gambardella Jan 15 '15 at 07:18