First of all, download from the website of Java.
I Download ' jdk-8u102-linux-i586.tar.gz '
Unzip it to the Specifical derictory.
With the COMMAND:TAR-ZXVF jdk-8u102-linux-i586.tar.gz-c/home/sonn/workspace/softwares/sonn_java/
Then you just need to set the SYS path.with the commands:
sudo gedit/etc/environment
and the command ' source/etc/environment ' to make it effective.
sudo gedit/etc/profile:
Finally reboot the PC. And you can see if it has become effective.
Then you can install Eclipse, download and Unzip.and go to the Directory Run command the file ' Eclipse ' to startup.
But ... ..... ..... ..... ..... ..... ....., ... and ... and ..... ......., ..., ..., ..., ......
That ' s really disgusting problem.
At last I found it is because I installed the JDK which was for 32-bit Linux.
Reinstall JDK with the right edition.
O.K.
Then I CAN DEVELOP JAVA on MY UBUNTU.
ENJOY IT.
How to install Java and Eclipse on Linux