JDK on Ubuntu

From KevinWiki

Revision as of 00:36, 2 December 2008 by Kevin (Talk | contribs)
Jump to: navigation, search


Installation of 32 bit JDK on 64 bit Ubuntu Linux

  • Install java-package to build deb file from the JDK bin file downloaded.
$ sudo apt-get install java-package
  • Build deb file.
$ DEB_BUILD_GNU_TYPE=i486-linux-gnu DEB_BUILD_ARCH=i386 fakeroot make-jpkg jdk-6u7-linux-i586.bin 
  • Install the deb file (e.g. sun-j2sdk1.6_1.6.0+update7_amd64.deb) just created.

It can be done by either typing

$ sudo dpkg -i sun-j2sdk1.6_1.6.0+update7_amd64.deb

or double-clicking the sun-j2sdk1.6_1.6.0+update7_amd64.deb file

  • Change the JDK currently used to the one just installed.

See Update-alternatives


Problem Solving

  • If the version of JDK 6 to build deb file is 'update 10' or higher and the following error is occurred,
No matching plugin was found.

edit /usr/share/java-package/sun-j2sdk.sh file.


  • Find the following lines (search with the keyword "jdk-6u")
	"jdk-6u"[0-9]"-linux-i586.bin") # SUPPORTED
	    j2se_version=1.6.0+update${archive_name:6:1}${revision}
	    j2se_expected_min_size=130
	    found=true
	    ;;
  • Change to
	"jdk-6u"[0-9][0-9]"-linux-i586.bin") # SUPPORTED
	    j2se_version=1.6.0+update${archive_name:6:2}${revision}
	    j2se_expected_min_size=130
	    found=true
	    ;;


  • Build the deb file again
$ DEB_BUILD_GNU_TYPE=i486-linux-gnu DEB_BUILD_ARCH=i386 fakeroot make-jpkg jdk-6u7-linux-i586.bin
Personal tools