When I type java -version the following is returned :
java version "1.6.0_24"
OpenJDK Runtime Environment (IcedTea6 1.11.1) (6b24-1.11.1-4ubuntu2)
OpenJDK Server VM (build 20.0-b12, mixed mode)
but when I type javac -version I get the following message :
The program 'javac' can be found in the following packages:
* openjdk-6-jdk
* ecj
* gcj-4.4-jdk
* gcj-4.6-jdk
* gcj-4.5-jdk
* openjdk-7-jdk
Try: sudo apt-get install <selected package>
Why is this ? What do I need to do to get rid of this ?
You have installed the java runtime environment (jre) which contains stuff to execute java programs, but not the java development kit (jdk) which contains stuff to build such applications, like the compiler. So install one of these packages, as the message tells you, e.g.