Install JDK in Ubuntu server10.10, run the following command: sudo apt-Get install sun-java6-jre, and then there is the following prompt:
Reading the package list... complete
Analyzing the dependency tree of the software package
Reading status information... complete
There is no available package sun-java6-jre now, but it is referenced by other packages.
This may mean that the missing software package may have been deprecated,Or it can only be found in other release sources
E: the package sun-java6-jre does not have candidates for Installation
Find the reason through the Internet, refer to the URL: http://www.ourys.com/post/ubuntu10-04-install-jdk-jre.html, the URL causes, solutions are very detailed.
Cause: Ubuntu10.10 removes the sun-java6-jre, the source of the sun-java6-jdk, so if it is direct apt-Get install there will be the above prompt.
Solution: Refer to the preceding URL and select the first method. The procedure is as follows:
Sudo apt-Get install Python-software-Properties
Sudo add-Apt-repository "Deb http://archive.canonical.com/Maverick/Partner "(Note: The Maverick here is your release version, and ubuntu10.10 is the version. You can run the lsb_release-C command to view the version)
Sudo apt-Get update
Then reinstall JDK,Sudo
Apt-Get install sun-java6-jdkYou can install it normally. After installation, java_home =/usr/lib/JVM/Java-6-sun.