JDK on Ubuntu

From KevinWiki

(Difference between revisions)
Jump to: navigation, search
(New page: Category:Linux ==Installation of 32 bit JDK on 64 bit Ubuntu Linux== *Download a 32 bit JDK from http://java.sun.com *Install java-package to build deb file from the JDK bin file dow...)
Line 17: Line 17:
*Change the JDK currently used to the one just installed.
*Change the JDK currently used to the one just installed.
See [[Update-alternatives]]
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,
 +
<pre>
 +
No matching plugin was found.
 +
</pre>
 +
edit <code>/usr/share/java-package/sun-j2sdk.sh</code> file.
 +
 +
 +
*Find the following lines (search with the keyword "jdk-6u")
 +
"<span style="color:blue; font-weight:bolder;">jdk-6u</span>"[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"<span style="color:red; font-weight:bolder;">[0-9][0-9]</span>"-linux-i586.bin") # SUPPORTED
 +
    j2se_version=1.6.0+update${archive_name:6:<span style="color:red; font-weight:bolder;">2</span>}${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

Revision as of 00:36, 2 December 2008


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