Hello and welcome to Linuxquestions!
Try the hole path to
javac
Code:
/path/of/java/javac file
You can put this in your /etc/bashrc file...
PATH=$PATH:/path/to/javac
export PATH
Now each time you open a terminal it should see
javac in your path.
Boby