Results 1 to 3 of 3

Thread: [SOLVED] Oracle Java 1.7 install

  1. #1
    Join Date
    Jan 2014
    Beans
    10

    [SOLVED] Oracle Java 1.7 install

    Standard install of Ubuntu 12.04 LTS Desktop installs OpenJDK1.07. I want Oracle JDK 1.7, so I installed it the following way:

    1) Download the JDK 7 from:
    http://www.oracle.com/technetwork/ja...s-1859576.html
    2) You will download the tar.gz file. Extract it to your preferred location then run this:– Create a new folder:sudo mkdir -p /usr/lib/jvm/jdk1.7.0


    – Move the content of JDK to your new locationsudo mv <EXTRACTED_FOLDER>/* /usr/lib/jvm/jdk1.7.0/


    – Then Run the following lines one at a timesudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.7.0/bin/java" 1

    sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.7.0/bin/javac" 1

    sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.7.0/bin/javaws" 1



    This seems to work perfectly. When doing a java -version it gives me the last installed version 1.7.0_45.

    But my question is: should I uninstall the OpenJDK1.7 (or leave it on my machine)?

    Thanks.


    Last edited by guy.dillen; January 4th, 2014 at 10:07 PM.

  2. #2
    Join Date
    Jul 2008
    Location
    The Left Coast of the USA
    Beans
    Hidden!
    Distro
    Kubuntu

    Re: Oracle Java 1.7 install

    Hello!

    You can leave it. They can coexist happlily. The one you select as your alternative is the one that will be used.

    Just so you are aware, you will have to watch for updates having done it the way you did. And you pounded out a few more keystrokes than you needed to.

    Please have a look at the link in my signature under "Command Line methods" and click on "Using webupd8.org's strikingly simple method" for a much easier way to install -- and it will automatically give you updates to Oracle Java 7 when you do your normal updates.

    Cheers!

  3. #3
    Join Date
    Jan 2014
    Beans
    10

    Re: Oracle Java 1.7 install

    Many thanks.

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
  •