For the Java works, you should install the JDK (Java Development Kit) and the JRE (Java Runtime Environment).
The JDK is the VM (Virtual Machine) of the Java. It’s responsible for compile the source code that will be executed.
The JRE is responsible for the environment, how to define variables and read them.
-
JDK
$ sudo apt-get install default-jdk
-
JRE
$ sudo apt-get install default-jre
$ sudo apt-get -fyu install icedtea-plugin