-1

I have been trying for quite some time to be able to compile and run my Java code in the Atom editor. No matter how I approach it.

I am using the "Script" plugin for Atom and have JDK 8 installed on my Windows 10 laptop.

This is the error that I am getting: 'javac' is not recognized as an internal or external command, operable program or batch file. [Finished in 0.073s]

Any ideas on how to get this working?

Capture of Atom error output.

Ethan R
  • 1
  • 1
  • does `javac` work on the Windows command prompt? – Tom Jan 30 '18 at 22:59
  • Are you sure the java path is added to your environment variables, `PATH`? – Andersnk Jan 30 '18 at 23:04
  • @Tom if I put `javac` into CMD this it the return I get. `C:\Users\ethanrusz>javac 'javac' is not recognized as an internal or external command, operable program or batch file.` – Ethan R Jan 30 '18 at 23:46
  • @Andersnk I have added `C:\Program Files\Java\jre1.8.0_161\bin` into System Variables. – Ethan R Jan 30 '18 at 23:50

1 Answers1

-1

I agree with others who added comments. This should be an issue with your PATH. Try to do echo $PATH in command line and verify that "C:\Program Files\Java\jre1.8.0_161\bin" show up as you mentioned that you added it to PATH. The second step is to go to that directory and make sure you can find javac there by trying to execute it from that directory. Let us know if it solves it.

alant
  • 82
  • 7
  • I updated to JDK 9, updated the old path from JDK 8 to the new one, and restarted my PC. That solved the issue. – Ethan R Jan 31 '18 at 00:19