Atom not finding JAVAC command.

Current Java version

openjdk version "11.0.3" 2019-04-16   OpenJDK Runtime Environment
(build 11.0.3+7-Ubuntu-1ubuntu218.04.1)   OpenJDK 64-Bit Server VM
(build 11.0.3+7-Ubuntu-1ubuntu218.04.1, mixed mode, sharing)
echo $PATH
  • 2
    What does javac -version output? – Stephen Kitt May 21 at 15:23
  • @StephenKitt "javac 11.0.3", im sorry – Miron May 21 at 15:51
  • OK, so your Java environment appears to be correctly configured; this sounds more like an Atom problem, I’m not familiar with that. – Stephen Kitt May 21 at 15:53
  • @StephenKitt visual studio code can't find jdk either. But Eclipce can. – Miron May 21 at 15:57
  • If this question actually explained that the problem was that although you can run these programs as commands from an interactive shell (some of) your IDEs fail to run them, it would be a lot clearer. – JdeBP May 21 at 16:25

Depends on your system, but maybe this will help

Do which java, and it should get you where the os is looking for it. Your PATH setting should be working.

Do ls -al /bin/java, and it might be a link to somewhere else. These links (again, depending on your OS version/distro) might get screwed up.

Follow the links and see if the end of the yellow brick road leads to somewhere, or invalid installation, perhaps?

  • 1
    "which java" says "/usr/bin/java" – Miron May 21 at 15:27
  • usr/bin/java exists. it is just a file – Miron May 21 at 15:32
  • 1
    It's javac that can't be found, not java. – Kusalananda May 21 at 15:44
  • usr/bin/javac exists too – Miron May 21 at 15:55
  • 1
    Is that a link? What is your OS/version? and what is the response for ls -al /usr/bin/javac? – gaborkorodi May 21 at 18:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.