Error: Does not recognize javac


Help! Is anyone having problems compiling java in the terminal? It is giving me the following error: Does not recognize javac



Depending on your workspace template and age, you may need to install java and/or the development packages for javac to work.

sudo apt-get install openjdk-7-jdk


You might have to do

sudo apt-get update

before to get it to work (was the case with me). Rather obvious, but still sometimes overseen.


And remember to check the environment path:

set the path in case of missing:


Thank you!This was the missing step for me. :grin: apt-get was out of date and couldn’t find the package.

  1. sudo apt-get update
  2. sudo apt-get install openjdk-7-jdk