Monday, April 27, 2009

Install Java in Ubuntu 9.04 'Jaunty Jackalope'

Java (programming language)

To install Java Runtime Environment in Ubuntu do this.

Open the terminal and run the following command:

 sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts

Soon you will come across Sun Operating System Distributor License for Java screen, hit Enter.

Next you will come across the DLJ licence terms, select 'yes' and hit Enter.

Ubuntu will now install JRE.

28 comments:

  1. @julianne
    now you can use any app which requires java, like limewire

    ReplyDelete
  2. I wish it had worked :( I get a message from java test sites i am using an old version (1.6.0-0) but cannot upgrade, and java applets won't open on any web browser - I 'm trying to open my net banking site on firefox 3.0.10. It worked fine when I had feisty fawn. Any suggestions?

    ReplyDelete
  3. @karin parker
    try to uninstall your current version before installing the new version.
    But you are still using 1.6?

    ReplyDelete
  4. I seem to have 1.6.0-0 of JRE. Being very new to linux, is there one command that will uninstall everything? Sorry to be a total newbie

    ReplyDelete
  5. @Karin Parker
    since you are new to Linux, why dont you try to use Synaptic to uninstall Java?
    Open Synaptic, then use the search box to find java and select the installed applications and uninstall them.

    ReplyDelete
  6. I thank you kindly for this - all is now working it seems :) And synaptic made life so much easier.
    Thanks for this blog - it's been a lifesaver

    ReplyDelete
  7. I've done this but the License screen has been on for like hours and it doesn't seem to be moving forward...HELP!!!!

    ReplyDelete
  8. ahh stuck at lincense screen I hit "enter" over and over again and no response

    ReplyDelete
  9. I had the same problem. Help, please!

    ReplyDelete
  10. I used TAB to highlight OK and pressed enter.

    ReplyDelete
  11. hope this thread is still open but here i go anyway.

    So i did what was suggested and I ran sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts in my terminal but it's telling me I have the latest version so there are 0 upgrade etc and when I visit Java.com it is still or keep telling me that Oops! You don't have the recommended Java installed.

    "Your Java version is 1.6.0_0. Please click the button below to get the recommended Java for your computer."

    and when I check what java in my computer through Synaptic Package Manager I get a long list of the latest imaginable versions of java installed.

    this is what i have on the top of my list
    Sun Java Platform Standard Edition Runtime Environment (JRE) 6..and so on and on. So why then I'm still being told that I only have version 1.6.0.0 ?

    Me confused :(

    ReplyDelete
  12. it's me again, here is a screen shot of my synaptic Package Manager on what java I have installed,..ooops I wonder if this cut and paste would work here.

    /home/will8545/Desktop/Screenshot-1.png

    ReplyDelete
  13. joshua@Playstation3:~$ sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Package sun-java6-plugin is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source
    E: Package sun-java6-plugin has no installation candidate

    I CANT GET IT TO WORK IVE BEEN ON THIS FOR DAYS NONSTOP TRYN TO GET IT TO WORK

    ReplyDelete
  14. @Joshua You might want to try Open JDK

    ReplyDelete
  15. i try to install jdk for my ubuntu 9.04 but it give this error, plz help to me this problem

    duleep@duleep-desktop:~$ apt-get install sun-java6-jdk
    E: Could not open lock file /var/lib/dpkg/lock - open (13 Permission denied)
    E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
    duleep@duleep-desktop:~$ sudo apt-get install sun-java6-jdk
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:

    The following packages have unmet dependencies:
    sun-java6-jdk: Depends: sun-java6-bin (= 6-06-0ubuntu1) but 6-13-1 is to be installed
    E: Broken packages

    ReplyDelete
  16. @Duleep
    try "sudo apt-get install sun-java6-jdk"
    instead of "apt-get install sun-java6-jdk"

    ReplyDelete
  17. @iampriteshdesai
    i try ur command but still in problem

    duleep@duleep-desktop:~$ sudo apt-get install sun-java6-jdk
    E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable)
    E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
    duleep@duleep-desktop:~$

    ReplyDelete
  18. Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?


    was Synaptic or Ubuntu Tweak on at that time?

    ReplyDelete
  19. duleep@duleep-desktop:~$ sudo apt-get install sun-java6-jdk
    [sudo] password for duleep:
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:

    The following packages have unmet dependencies:
    sun-java6-jdk: Depends: sun-java6-bin (= 6-06-0ubuntu1) but it is not going to be installed
    E: Broken packages
    duleep@duleep-desktop:~$

    ReplyDelete
  20. This comment has been removed by the author.

    ReplyDelete
  21. whats a java ideal to ubuntu 9.04?

    ReplyDelete
  22. This comment has been removed by the author.

    ReplyDelete
  23. This worked for me:

    1 Install :
    $ sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-jdk sun-java6-doc sun-java6-bin sun-java6-fonts
    agree to DLJ license

    2 Activate:
    update-alternatives --config java
    choose sun java (if choice given)

    Even if only output is

    There is only 1 program which provides java
    (/usr/lib/jvm/java-6-sun/jre/bin/java). Nothing to configure.

    it did something. your output may also be

    # update-alternatives --config java
    There are 2 choices for the alternative java (providing /usr/bin/java).

    Selection Path Priority Status
    ------------------------------------------------------------
    * 0 /usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 auto mode
    1 /usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 manual mode
    2 /usr/lib/jvm/java-6-sun/jre/bin/java 63 manual mode

    pick java-6-sun, in this case #2, logically enough by hitting 2[enter] lol

    then do

    # apt-get remove openjdk-6-jre openjdk-6-jre-headless openjdk-6-jre-lib

    if it appears(as it does above) that openjdk is installed.

    3 Clean Up old Links/Binaries (if any) (!!!!PLEASE adapt following to your environment - change paths etc)
    Delete ALL pluginreg.dat file(s)
    $ rm ~/.mozilla/firefox/ul9j1z05.default/pluginreg.dat
    # updatedb && locate libnpjp2.so libjavaplugin_oji.so
    [output] might be similar to
    /home/SomeUser/.mozilla/plugins/libjavaplugin_oji.so
    /home/SomeUser/.mozilla/plugins/libnpjp2.so
    /home/AnotherUser/.mozilla/firefox/plugins/libjavaplugin_oji.so
    /opt/firefox/plugins/libjavaplugin_oji.so
    /usr/lib/firefox/plugins/libjavaplugin_oji.so
    /usr/lib/firefox-plugins/libjavaplugin_oji.so
    /usr/lib/firefox-plugins/plugins/libjavaplugin_oji.so
    /usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib/i386/libnpjp2.so
    /usr/lib/jvm/java-6-sun-1.6.0.20/jre/plugin/i386/ns7/libjavaplugin_oji.so
    /usr/lib/jvm/java-6-sun-1.6.0.20/jre/plugin/i386/ns7-gcc29/libjavaplugin_oji.so

    remove all instances if any of libnpjp2.so and libjavaplugin_oji.so EXCEPT the ones in "/usr/lib/jvm/- - - - -"
    # rm /home/SomeUser/.mozilla/plugin/libjavaplugin_oji.so
    # rm /home/SomeUser/.mozilla/firefox/plugins/libnpjp2.so
    # rm /opt/firefox/plugins/libjavaplugin_oji.so
    -- NOT --
    rm /usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib/i386/libnpjp2.so

    4 Link In Fresh Plugins
    cd /opt/firefox/plugins/
    sudo ln -s /usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib/i386/libnpjp2.so .
    sudo ln -s /usr/lib/jvm/java-6-sun-1.6.0.20/jre/plugin/i386/ns7/libjavaplugin_oji.so .

    # updatedb && locate libnpjp2.so libjavaplugin_oji.so
    [output] should be
    /opt/firefox/plugins/libjavaplugin_oji.so
    /opt/firefox/plugins/libnpjp2.so
    /usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib/i386/libnpjp2.so
    /usr/lib/jvm/java-6-sun-1.6.0.20/jre/plugin/i386/ns7/libjavaplugin_oji.so
    /usr/lib/jvm/java-6-sun-1.6.0.20/jre/plugin/i386/ns7-gcc29/libjavaplugin_oji.so


    5 Test Firefox
    $ firefox http://www.java.com/en/download/installed.jsp

    click (Verify java ......) or the like

    [output] should be

    Verified Java Version
    Congratulations!
    You have the recommended Java installed (Version 6 Update 20).

    if this happens, WOOHOO!!!!

    if not, keep on searchin... and comment back with what works for you!!

    Originally posted at
    http://mrinvader.blogspot.com/2010/05/stupid-effing-java.html

    ReplyDelete

Note: Only a member of this blog may post a comment.

Related Content

Related Posts with Thumbnails