Page 1 of 9 123 ... LastLast
Results 1 to 10 of 86

Thread: [HOWTO / SCRIPT] - Packaging and installing Java 1.6.0 (Mustang) JRE in few moves!

  1. #1
    Join Date
    Nov 2005
    Location
    Italy
    Beans
    299
    Distro
    Ubuntu Development Release

    Lightbulb [HOWTO / SCRIPT] - Packaging and installing Java 1.6.0 (Mustang) JRE in few moves!

    Hello, while Java 1.5 has been added to our repositories some time ago, a new Java release is coming...
    In fact, Java 1.6.0 (codenamed mustang) is actually in Release Candidate state but it is just really stable and really much more performing (using, from my point of view, less memory!).

    Features
    This is a summarized list of the new features; first of all for linux users I've to underline the support for full-screen mode, then for all the support for native GTK graphics widgets (i.e. your gtk theme from your gtkrc conf file!), and subpixel rendering (finally!)
    I want explain better this two “main” graphical features, showing what has really changed from the user interface point of view (anyway here you can find more informations on all others new aesthetics features).

    Gtk graphic theme support

    Above you can see some kind of java test widgets rendered using “your” linux (true) gtk theme (the one in the shot, is QtCurve the Qt/Gtk theme/engine that I use). You can see another example in this screenshot showing Mercury rendered using the Ubuntu Human Quicksilver gtk theme!!
    Finally Java apps could look like your standard applications!

    Anyway this feature isn't enabled by default (newer versions of make-jpkg-mustang will support it), you must define this environment variable:
    Code:
    export _JAVA_OPTIONS="-Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel"
    Btw some applications like Mercury have a built-in theme selector; in those cases, you should select the "Gtk theme".

    Subpixel Rendering

    Above you can see how it looks good the new font rendering (especially for LCD screens), the three windows shows (from left to right):
    1) Java 1.5 (standard “old” java font rendering)
    2) Java 1.5 (using the "-Dswing.aatext=true" paramter that activate a semi-antialiased font rendering)
    3) Java 1.6 (using the built-in new subpixel rendering)

    Java 1.6 reads your gnome (and KDE, using a package made with make-jpkg-mustang >=0.7.5) font antialiasing/rendering settings and apply it to its applications too; as you can see in the screenshot (3) the result is great (there are, btw, more settings so the screenshot shows only a case).
    Finally Java apps could have a smoother look in your LCD screen!


    You can find more informations on Mustang's subpixel rendering here.

    Installation
    Anyway after this little explaination, let's install and package it...
    Well... Considering that the java-package's make-jpkg doesn't work with latest versions of the binary, I've decided to create a my own script that in only a move:
    - Downloads the latest jdk java package (working both for i386 and amd64)
    - Extracts it, removing the unnecessary JDK stuff
    - Creates a debian JRE package to be installed in your system
    - The package installs and sets as default (using update-alternatives) all the Jre's binaries and the firefox java plugin
    - KDE kcontrol font rendering settings supported (read here)

    To install this script, you've only to install a package from My Repository.
    Add it to your sources.list (there's also other cool stuff):
    Code:
    deb http://download.tuxfamily.org/3v1deb/ 3v1n0
    Then
    Code:
    sudo apt-get install make-jpkg-mustang
    Anyway, if you don't want to add the repository, you can simply install the .deb downloading it from this page (look for the make-jpkg-mustang deb!).

    To do everything you need run (as user, please!)
    Code:
    make-jpkg-mustang
    The script will do all the work, btw you've to agree with the Sun Java License.

    You can also generate the debian package from another mustang's downloaded bin file by running

    Code:
    make-jpkg-mustang /your_dir/your_sun_jdk_binary_file.bin
    After that the downloading/converting process has ended, you're asked for installing the just made package; if you refuse, you've to manually install the created package saved where the script says.

    That's All!

    Notes:
    You don't need to remove the standard sun-java5-* packages, simply if you want to re-use the old version use the command sudo update-alternatives --config java to set your favourite java virtual machine (or simply run the standard jvm by /usr/lib/jvm/java-1.5.0-sun/jre/bin/java)!

    Actually the make-jpkg-mustang package build only the sun-java6-jre package, anyway, I'm planning to integrate it to create also the other packages (jdk, src, plugin, demo...): let me know if you're intrested in!

    This should work in amd64 systems too, btw it's not tested there, so, please, let me know if there's something of wrong!

    KDE font rendering settings are now read by an "home-made" script... To use subpixel rendering, use kcontrol standard font settings.

    KDE/Qt theme Java support isn't just now in a Work in Progress status (read/try more here), anyway you can use the Gtk-Qt engine to make your gtk (and so, java) applications look (quite) like your KDE's ones.
    Otherwise use themes like QtCurve (present in my repository) to make both Qt and Gtk applications looks the same!

    FIXED in Java build 1.6.0_01-ea-b01 (or using the make-jpkg-mustang for previous versions):
    Java 1.6 (as the 1.5) could have problems with Compiz (for example, windows are open with a smaller horizontal size, so they appears like a vertical line), read here. Anyway I'm running J2Se 1.6 with Compiz for weeks, so this is not a great bug...
    If you found this usefull, please digg it!

    PS: In the screenshot you see Java 1.6 running Mercury, btw to run it you need to disable the trayicon; use kdocker or alltray instead!
    Last edited by Treviño; December 17th, 2006 at 08:37 PM. Reason: Updated informations for Java 1.6 and next releases

  2. #2
    Join Date
    Apr 2006
    Beans
    5

    Re: [HOWTO / SCRIPT] - Packaging and installing Java 1.6.0 (Mustang) JRE in few moves

    Does this work for anyone?

    After I run make-jpkg-mustang I get the following output. I thought the script took care of the install? The note states that I still need to install the java package?

    Building debian package in /tmp/sun-java6-jre_1.6.0-rc-b99_i386.deb...
    Removing jdk and debian temporary directory trees...

    Do you want remove temporary binary file '/tmp/jdk-6-rc-bin-b99-linux-i586-15_sep_2006.bin'?
    [Y/n]: n

    Done!
    Now, you must install the package sun-java6-jre_1.6.0-rc-b99_i386.deb
    Then, check your java version using "update-alternatives" and "java -version"

    update-alternatives --list java
    /usr/bin/gij-wrapper-4.1
    /usr/lib/jvm/java-gcj/jre/bin/java
    /usr/lib/jvm/java-1.5.0-sun/jre/bin/java

  3. #3
    Join Date
    Feb 2006
    Location
    Heraklion, Greece
    Beans
    115
    Distro
    Hardy Heron (Ubuntu Development)

    Re: [HOWTO / SCRIPT] - Packaging and installing Java 1.6.0 (Mustang) JRE in few moves

    robounix, you must manually install the generated .deb package.

    It worked for me, a firefox-plugin would be nice though.
    War is Peace. Freedom is Slavery. 2+2=5.

  4. #4
    Join Date
    Apr 2006
    Beans
    5

    Re: [HOWTO / SCRIPT] - Packaging and installing Java 1.6.0 (Mustang) JRE in few moves

    I think my issue is that no .deb package seems to be created, even though the script indicates that it is. I've even tried in another filesystem and as another user.

    Is there a pre-packaged Mustang file floating around yet?

  5. #5
    Join Date
    Nov 2005
    Location
    Italy
    Beans
    299
    Distro
    Ubuntu Development Release

    Re: [HOWTO / SCRIPT] - Packaging and installing Java 1.6.0 (Mustang) JRE in few moves

    Quote Originally Posted by anodizer View Post
    robounix, you must manually install the generated .deb package.

    It worked for me, a firefox-plugin would be nice though.
    Well... The firefox plugin is installed...

    To check that the plugin is loaded by firefox see aboutlugins in your browser; if there's no java plugin you've only to do a
    Code:
    sudo update-alternatives --config firefox-javaplugin.so
    Anyway, this should be done by default by the debian package.
    I think my issue is that no .deb package seems to be created, even though the script indicates that it is. I've even tried in another filesystem and as another user.
    This script should create the package in the directory where you've launched it, if writable; otherwise it will make it in your home directory.

    Maybe a locate could help you.

    Anyway I'll update the script with an installation request, to make it even simpler

    Thanks for your feedback!

  6. #6
    Join Date
    Apr 2006
    Beans
    5

    Re: [HOWTO / SCRIPT] - Packaging and installing Java 1.6.0 (Mustang) JRE in few moves

    I'm still trying. No .deb package is being built on my system, even though the script says it's in my home directory. I've monitored both /tmp and my home directory and the only thing I ever see show up is the jdk-6-rc-bin-b99-linux-i586-15_sep_2006.bin file in /tmp.

    Also, the java plugin is not installing in my firefox.

    I also tried this on another Dapper box - same result.

    Any other suggestions would be greatly appreciated!
    Last edited by robounix; September 26th, 2006 at 03:28 PM.

  7. #7
    Join Date
    Nov 2005
    Location
    Italy
    Beans
    299
    Distro
    Ubuntu Development Release

    Re: [HOWTO / SCRIPT] - Packaging and installing Java 1.6.0 (Mustang) JRE in few moves

    Sure, if you don't install the debian package, you can't have the firefox plugin...
    Btw your situation is strange...

    What does the make-jpkg-mustang says when it finishes?

    Try to do this
    Code:
    cd /tmp
    mkdir tmp-sun
    cd tmp-sun
    make-jpkg-mustang
    ls -lh
    The package must bhe there...
    If you don't get any warning it should be there...

    Anyway if it still doesn't work, send me a private message, I'll send you a "debug" version so maybe we'll see what's wrong.

    PS: I've made this script becouse I heard that we can't freely redistribuite own version of java packages!

  8. #8
    Join Date
    Apr 2006
    Beans
    5

    Re: [HOWTO / SCRIPT] - Packaging and installing Java 1.6.0 (Mustang) JRE in few moves

    Perhaps this is a proxy issue. Is anything else being downloaded other then they java bin?

    Here's my output of make-jpkg-mustang:

    rob@recoil:/tmp/tmp-sun$ make-jpkg-mustang
    Downloading jdk-6-rc-bin-b99-linux-i586-15_sep_2006.bin in /tmp...

    --11:09:32-- http://www.java.net/download/jdk6/bi...5_sep_2006.bin
    => `jdk-6-rc-bin-b99-linux-i586-15_sep_2006.bin'
    Connecting to [proxy address]... connected.
    Proxy request sent, awaiting response... 301 Moved Permanently
    Location: http://download.java.net/jdk6/binari...5_sep_2006.bin [following]
    --11:09:32-- http://download.java.net/jdk6/binari...5_sep_2006.bin
    => `jdk-6-rc-bin-b99-linux-i586-15_sep_2006.bin'
    Connecting to [proxy address]... connected.
    Proxy request sent, awaiting response... 416 Requested Range Not Satisfiable

    The file is already fully retrieved; nothing to do.


    Download Complete!

    Now will be run 'jdk-6-rc-bin-b99-linux-i586-15_sep_2006.bin', you must accept the Sun's Java license to generate your debian package

    Press any key to continue

    Done.

    Creating the debian package directory tree...
    Generating debian package control file...
    Calculating md5 sum...
    Building debian package in /tmp/tmp-sun/sun-java6-jre_1.6.0-rc-b99_i386.deb...
    Removing jdk and debian temporary directory trees...

    Do you want remove temporary binary file '/tmp/jdk-6-rc-bin-b99-linux-i586-15_sep_2006.bin'?
    [Y/n]:

  9. #9
    Join Date
    Sep 2005
    Location
    NY
    Beans
    7

    Re: [HOWTO / SCRIPT] - Packaging and installing Java 1.6.0 (Mustang) JRE in few moves

    Quote Originally Posted by robounix View Post
    Perhaps this is a proxy issue. Is anything else being downloaded other then they java bin?

    Here's my output of make-jpkg-mustang:

    rob@recoil:/tmp/tmp-sun$ make-jpkg-mustang
    Downloading jdk-6-rc-bin-b99-linux-i586-15_sep_2006.bin in /tmp...

    Do you want remove temporary binary file '/tmp/jdk-6-rc-bin-b99-linux-i586-15_sep_2006.bin'?
    [Y/n]:
    Just a guess here....I had the same thing happen on a brand spanking new install this morning, same output.

    I later tried it my regular box and it worked fine...I'm thinking you need
    to have something like build-essentials, fakeroot or dpkg-dev installed.
    some package that allows you to build .debs that isn't installed automatically. Not sure which it might be.

    Looking forward to checking out 1.6, nice script (tho I think there are some dependency issues)

  10. #10
    Join Date
    Nov 2005
    Location
    Italy
    Beans
    299
    Distro
    Ubuntu Development Release

    Re: [HOWTO / SCRIPT] - Packaging and installing Java 1.6.0 (Mustang) JRE in few moves

    Well, my package actually depends on
    coreutils, dpkg, wget, gzip
    Anyway, looking the code I forgot to add fakeroot too...
    Do you have it?

    If not, install it... Anyway I'm updating the package...

Page 1 of 9 123 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •