0

I am starting to teach myself Java programming and found a great book called Java: A Beginner's Guide, Sixth Edition by Herbert Schildt. I really like it.

I am also doing the udacity.com classes which uses the BlueJ ide. I want to install javac and run and compile a java source code file from Windows 7 cmd prompt, but I can't get javac to work!

Java JDK1.8.0_60 is currently installed in C:\Program Files\Java. I went to environment variables under system and only have a 'Path' variable. I don't have a 'PATH' one. How do I get javac to work?

halfer
  • 19,824
  • 17
  • 99
  • 186
John Kooz
  • 27
  • 2

1 Answers1

1

Add the Java Bin to the Path Environment Variable As (Assuming JDK1.8.0_60 is the correct folder),

C:\Program Files\Java\JDK1.8.0_60\bin

When you edit the path variable, go to the end of the value and look for a ; . If you have a semicolon. just add the above value and use another ; to end that variable value. Do save/ apply/ ok, Close existing command prompts and them start a new one try java -version

Edit:

Can you go in to this C:\Program Files\Java\JDK1.8.0_60\bin folder and see if you have a file called javac?

diyoda_
  • 5,274
  • 8
  • 57
  • 89
  • java -version in command prompt produces: java version "1.8.0_60" Java (TM) SE Runtime Environment (build 1.8.0_60-h27) and more but javac still produces: 'javac' is not recognized as an internal or external command, operable program or batch file. this is annoying. I want javac to work! Or to at least get eclipse to compile and run. Please help. thanks. – John Kooz Aug 29 '15 at 00:29
  • @JohnKooz can you follow my new edit and check if it exists? – diyoda_ Aug 29 '15 at 06:00