Normally on Ubuntu and its
derivatives like XUbuntu, java is present but is a open source version
that not support all the features.For this reason on some web
internet site isn't possible run the java scripts.For resolve this problem is
necessary remove the java open source version and instal the java full
version.

Remove java open source version

From the terminal type: sudo apt-get
purge openjdk*

Go to ORACLE site and download the Java Virtual Machine in rpm
format (flags the: accept for license agreement).

Choose the right version for your PC.For example I have a Intel
Pentium Dual Core (x86) and the right version is show below the red box.

Convert RPM to DEB

RPM format is not compatible with
Ubuntu so is necessary convert it in DEB format.For do this is necessary use alien.If alien is not present on your
distribution install it by this command: sudo
aptitude install alien
Now convert file from RPM to DEB, for do this use this command:sudo
alien jre-7u51-linux-i586.rpmOf course change the name:
jre-7u51-linux-i586.rpm, with the name of the package that you chose
for your PC.

Install DEB package

Now you have a DEB package and for
install it, click twice on it.At this point the PC open the Ubuntu Software Center and you
follow the instructions that appear on your monitor.At the end of the installation,
for verify if java is installed correctly, use this command:java -versionYou must see something like
this: