The easiest way to install the JDK under Ubuntu is to use the APT install command, but the JDK installed is often not the latest version, and to install the latest JDK you need to go to Sun's http://www.aliyun.com/zixun/ Aggregation/11307.html "> The official website downloads. But the Sun's web site has only rpm and bin two formats, and there is no Deb format used by Ubuntu, which requires us to use the Ubuntu conversion tool. We can download the bin format, the latest JDK files are:
Jdk-6u13-linux-i586.bin
For Linux users, Java 1.6 has two new features that are particularly compelling: one is to support GTK graphics themes so that the appearance of the Java application looks the same as the default appearance of the system; The second is that the embedded new font rendering engine applies the system default font configuration to make Java The application looks good, and if it's an LCD screen, it's better.
If you need to enjoy new Java features faster, follow these steps to install JDK 6 in Ubuntu.
1, from the official Java website Download JDK 6 (http://java.sun.com/javase/downloads/index.jsp) standby, note that the downloaded files for Jdk-6-linux-i586.bin.
2, to the site download java-package0.28ubuntu1all.deb (http://linuxtoy.org/deb/), and use sudo dpkg-i java-package<em>0.28ubuntu1 </em>all.deb installation.
3, prepare fakeroot tools, if not, use the sudo apt install fakeroot to install.
4, using Fakeroot make-jpkg jdk-6-linux-i586.bin to make Deb package, the generated file name is Sun-j2sdk1.61.6.0i386.deb.
5, install JDK 6, execute command sudo dpkg-i sun-j2sdk1.6<em>1.6.0</em>i386.deb can.
After the installation is complete, you can perform java-version to view the current version of Java. In addition, if your system contains other Java versions, you can use sudo update-alternatives--config java to select the latest version.
I started with this to install, but because Linuxtoy did not java-package0.28ubuntu1all.deb download,
Went to Google again, found:
Http://packages.qa.debian.org/j/java-package.html
is the source of Java-pakage, and the latest is already 0.42 version (I use the 0.28 version of the discovery can not install jdk1.6.10, because the version is missing some files), so download the latest version of the source code:
Http://ftp.de.debian.org/debian/pool/contrib/j/java-package/java-package_0.42.tar.gz
Extract after successful download: Tar zxvf java-package_0.42.tar.gz
Then CD java-package_0.42 directory, execute command compilation (may require root permission, preceded by sudo or fakeroot):
$ debian/rules Binary
This generates the Java-package_0.42_all.deb file. My system prompts to install Debhelper, with apt install debhelper is OK.
You can now install Java-package:
$ sudo dpkg-i. /java-package_0.42_all.deb
After the installation is successful, use the APT install fakeroot command to install Fakeroot. And then run:
$ fakeroot make-jpkg Jdk-6u13-linux-i586.bin