Error: Does not recognize javac


#1

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

Thanks,


#2

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


#3

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.


#4

And remember to check the environment path:
$PATH

set the path in case of missing:


#5

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