Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: HOWTO: Run / Install Sun Java with the Firefox Plugin on an Ubuntu Live CD or USB

  1. #1
    Join Date
    Jun 2008
    Beans
    7

    HOWTO: Run / Install Sun Java with the Firefox Plugin on an Ubuntu Live CD or USB

    How to: Run / Install Sun Java with the Firefox Plugin on an Ubuntu Live CD or USB

    NOTE: This should work with Hardy Heron 8.04, Gutsy Gibbon 7.10, Feisty Fawn 7.04 and others (but definitely Hardy Heron 8.04 ).

    Introduction
    Firstly, I'm a complete noob at ubuntu, and only look like I know what I'm talking about from the research I have done trying to solve this problem.

    THE PROBLEM
    When running Ubuntu from a live cd or live usb, and trying to install java, the following errors appear:

    java: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory
    OR
    Setting up sun-java6-bin (6-06-0ubuntu1) ...
    Error: could not find libjava.so
    Error: could not find Java 2 Runtime Environment.

    Getting and Preparing the files

    Adding the Multiverse and Universe Repositories
    Go to 'System', 'Administration', 'Software Sources'.
    On the 'Ubuntu Software' tab tick the multiverse and universe boxes.
    Click 'Close'. It will ask you to reload/refresh; DO IT!

    Getting and Installing Java
    Online Install
    Do this in a terminal for JRE (basically if you're not a java developer):
    • sudo apt-get install sun-java6-jre sun-java6-plugin

    Do this in a terminal for JDK (basically if you ARE a java developer):
    • sudo apt-get install sun-java6-jdk sun-java6-plugin

    Offline Install
    This is actually the method used for reasons specific to me.
    Just do this: http://kzhvnkv.com/ubuntu-java-offline


    Say yes to whatever either method asks. If you are on a live CD or USB (even if it is Feisty 7.04, Gutsy 7.10, or Hardy 8.04 - I tried them all) you will probably get something like this:
    Setting up sun-java6-bin (6-00-2ubuntu2) ...
    /usr/lib/jvm/java-6-sun-1.6.0.00/bin/java: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory
    dpkg: error processing sun-java6-bin (--configure):
    subprocess post-installation script returned error exit status 127
    dpkg: dependency problems prevent configuration of sun-java6-plugin:
    sun-java6-plugin depends on sun-java6-bin (= 6-00-2ubuntu2); however:
    Package sun-java6-bin is not configured yet.
    dpkg: error processing sun-java6-plugin (--configure):
    dependency problems - leaving unconfigured
    dpkg: dependency problems prevent configuration of sun-java6-jre:
    sun-java6-jre depends on sun-java6-bin (= 6-00-2ubuntu2) | ia32-sun-java6-bin (= 6-00-2ubuntu2); however:
    Package sun-java6-bin is not configured yet.
    Package ia32-sun-java6-bin is not installed.
    dpkg: error processing sun-java6-jre (--configure):
    dependency problems - leaving unconfigured
    Errors were encountered while processing:
    sun-java6-bin
    sun-java6-plugin
    sun-java6-jre
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    Fixing that Error
    Go into a terminal and do the following:
    (Copy and paste using right-click so you don't get any of them wrong)
    1. Code:
      sudo su
    2. Code:
      LD_LIBRARY_PATH=CHANGEME dpkg --configure -a
      -----The CHANGEME part should be changed to the location of libjli.so
      -----Open your File System, go Ctrl+F, search for 'libjli'
      -----Mine was in '/usr/lib/jvm/java-6-sun-1.6.0.06/jre/lib/i386/jli'
      ----------so I used LD_LIBRARY_PATH=/usr/lib/jvm/java-6-sun-1.6.0.06/jre/lib/i386/jli dpkg --configure -a
    3. Code:
      ln -s / /cow
    4. Run whichever of these you used before again:
      Code:
      sudo apt-get install sun-java6-jre sun-java6-plugin
      sudo apt-get install sun-java6-jdk sun-java6-plugin
      -----Say yes to anything it asks.
      -----It should work perfectly this time with no errors.


    Verification of Success
    In a terminal type:
    Code:
    java -version
    Something like this should appear:
    java version "1.6.0_06"
    Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
    Java HotSpot(TM) Server VM (build 10.0-b22, mixed mode)
    In firefox, where you would type a website type:
    Code:
    about:plugins
    You should see something like this (you might have to scroll to find it):
    Java(TM) Plug-in 1.6.0_06-b02

    File name: libjavaplugin_oji.so
    Java(TM) Plug-in 1.6.0_06
    With a huge table underneath it.

    Go to this website: http://java.com/en/download/help/testvm.xml

    An applet will run near the bottom if you java is working correctly.

    Conclusion and Credits
    I have no idea why any of this is, so please don't reply here thinking that I know what I'm talking about. If you reply here with a problem, however, some other helpful soul might just come along.

    I was only able to write this due to hours of research, eventually leading me to these three significant pages:
    http://ubuntuforums.org/archive/index.php/t-414851.html
    https://bugs.launchpad.net/ubuntu/+s...a6/+bug/103933
    http://ubuntuforums.org/showpost.php...3&postcount=12
    So, for those pages and to the people on them, thank you.

    I hope someone finds my tutorial useful.

    aMeR1CaN_aUsSiE

  2. #2
    Join Date
    Jun 2008
    Beans
    35
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: HOWTO: Run / Install Sun Java with the Firefox Plugin on an Ubuntu Live CD or USB

    Thank you so much! Your HOWTO was very, very helpful!

  3. #3
    Join Date
    Jun 2008
    Beans
    7

    Re: HOWTO: Run / Install Sun Java with the Firefox Plugin on an Ubuntu Live CD or USB

    No problems xenolalia. Glad to help.

  4. #4
    Join Date
    Nov 2006
    Beans
    14

    Re: HOWTO: Run / Install Sun Java with the Firefox Plugin on an Ubuntu Live CD or USB

    Hm, i still have a problem:
    LD_LIBRARY_PATH=/usr/lib/jvm/java-6-sun-1.6.0.06/jre/lib/i386:/usr/lib/jvm/java-6-sun-1.6.0.06/jre/lib/i386/jli dpkg --configure -a
    Setting up sun-java6-bin (6-06-0ubuntu1) ...
    Error: could not find libjava.so
    Error: could not find Java 2 Runtime Environment.
    dpkg: error processing sun-java6-bin (--configure):
    ...

    As you see i added the path to libjava.so (/usr/lib/jvm/java-6-sun-1.6.0.06/jre/lib/i386 in my case) and it still doesn't find it. Notice that it now does find the libjli.so library as it had trouble finding it before.

  5. #5
    Join Date
    Jun 2008
    Beans
    7

    Re: HOWTO: Run / Install Sun Java with the Firefox Plugin on an Ubuntu Live CD or USB

    Basically you didn't do steps 3 and 4.

    Doing this:
    Code:
    LD_LIBRARY_PATH=/usr/lib/jvm/java-6-sun-1.6.0.06/jre/lib/i386/jli dpkg --configure -a
    solves this problem:
    java: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory
    but creates this problem:
    Setting up sun-java6-bin (6-06-0ubuntu1) ...
    Error: could not find libjava.so
    Error: could not find Java 2 Runtime Environment.
    So run this command exactly (which it appears you did, but do it again anyway):
    Code:
    LD_LIBRARY_PATH=/usr/lib/jvm/java-6-sun-1.6.0.06/jre/lib/i386/jli dpkg --configure -a
    Then FROM THE SAME TERMINAL DO STEPS 3 AND 4 as I posted above.

    aMeR1CaN_aUsSiE

  6. #6
    Join Date
    Apr 2006
    Beans
    3

    Re: HOWTO: Run / Install Sun Java with the Firefox Plugin on an Ubuntu Live CD or USB

    Thank you very much.....

    It works for me, and now i can playing my Dosbox Game Launcher

  7. #7
    Join Date
    Jun 2008
    Beans
    7

    Re: HOWTO: Run / Install Sun Java with the Firefox Plugin on an Ubuntu Live CD or USB

    No problems. Enjoy your Dosbox Game Launcher, whatever that is. =D

  8. #8
    Join Date
    Oct 2008
    Beans
    1

    Smile Re: HOWTO: Run / Install Sun Java with the Firefox Plugin on an Ubuntu Live CD or USB

    Thanks a lot very much!
    it's working fine with me with: Ubuntu 8.04 on a WD Passport USB disk.

    Bye Marco

  9. #9
    Join Date
    Oct 2005
    Location
    Oklahoma
    Beans
    427

    Re: HOWTO: Run / Install Sun Java with the Firefox Plugin on an Ubuntu Live CD or USB

    I think I've heard that these steps won't be needed for Intrepid (Ubuntu 8.10) Can anyone confirm that?

  10. #10
    Join Date
    Nov 2006
    Location
    Chennai, India
    Beans
    121
    Distro
    Ubuntu

    Re: HOWTO: Run / Install Sun Java with the Firefox Plugin on an Ubuntu Live CD or USB

    Ubuntu 8.10 RC, did download & install openjdk fireox plugin

    having said tht, couldn't find sun java plugin in synaptic though sun java 5/6 is available

Page 1 of 2 12 LastLast

Tags for this Thread

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
  •