Results 1 to 7 of 7

Thread: Installing only one java instance

  1. #1
    Join Date
    Nov 2014
    Beans
    7

    Installing only one java instance

    I just installed oracle jdk7 by following this url. now when i did java -version, I got java 1.6 in response though i am expecting oracle java 1.7.

    When i browsed to usr/lib/jvm/ I can see there are at least 3-4 different versions of java there

    1. java-1.7.0-openjdk-amd64
    2. java-6-oracle
    3. java-7-oracle
    4. java-6-openjdk-amd64
    5. java-7-openjdk-amd64

    I don't want these many installations there. All i want is Oracle java 1.7_0_55. Can someone help.

    Thanks

  2. #2
    Join Date
    Aug 2009
    Location
    Makati City, Philippines
    Beans
    2,269
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: Installing only one java instace

    Did you install any java version before you installed the one from your link?

    You should have uninstalled them first before you installed the one from your link.

  3. #3
    Join Date
    Nov 2014
    Beans
    7

    Re: Installing only one java instance

    I didn't install anything bnefore the link. I know i should have but it never occured to me. now i want to make sure there is only one version of java and that is Oracke 1.7u55

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

    Re: Installing only one java instance

    Hello!

    First -- Any number of Java versions can be resident on your machine at any time without interfering with each other. In fact, you can switch between them by updating your alternatives (see the command at the end of this post). So unless space is a problem, there's no reason at all to uninstall any of them. If you want to, however, you can do so.

    Oracle Java 7 Update 55 is not the most recent update anyway -- so what you should be getting from webupd8 would be newer than what is shown on that website.

    Since Oracle Java 6 has been dropped (and shouldn't be used due to security issues), the fact that it is installed would seem to indicate that at some point it was deliberately installed. Might you have installed something from the web that might also have brought along Java 6 as a dependency?

    What release of Ubuntu are you using? OpenJDK 6 would not likely have been installed by default in any recent release of Ubuntu. I don't think OpenJDK is even installed by default lately.

    As for why you are getting what you see when you do

    Code:
    java -version
    I think something must have gone wrong. The webupd8 scripts should have set Oracle Java 7 as your chosen alternative.

    Did you get any error messages?

    Could you issue the following in the terminal and copy the results back here without making a selection?

    Code:
    sudo update-alternatives --config java
    Last edited by QIII; December 8th, 2014 at 10:32 PM.
    Please read The Forum Rules and The Forum Posting Guidelines

    A thing discovered and kept to oneself must be discovered time and again by others. A thing discovered and shared with others need be discovered only the once.
    This universe is crazy. I'm going back to my own.

  5. #5
    Join Date
    Nov 2014
    Beans
    7

    Re: Installing only one java instance

    Quote Originally Posted by QIII View Post
    Hello!

    First -- Any number of Java versions can be resident on your machine at any time without interfering with each other. In fact, you can switch between them by updating your alternatives (see the command at the end of this post). So unless space is a problem, there's no reason at all to uninstall any of them. If you want to, however, you can do so.

    Oracle Java 7 Update 55 is not the most recent update anyway -- so what you should be getting from webupd8 would be newer than what is shown on that website.

    Since Oracle Java 6 has been dropped (and shouldn't be used due to security issues), the fact that it is installed would seem to indicate that at some point it was deliberately installed. Might you have installed something from the web that might also have brought along Java 6 as a dependency?

    What release of Ubuntu are you using? OpenJDK 6 would not likely have been installed by default in any recent release of Ubuntu. I don't think OpenJDK is even installed by default lately.

    As for why you are getting what you see when you do

    Code:
    java -version
    I think something must have gone wrong. The webupd8 scripts should have set Oracle Java 7 as your chosen alternative.

    Did you get any error messages?

    Could you issue the following in the terminal and copy the results back here without making a selection?

    Code:
    sudo update-alternatives --config java

    Code:
    There are 3 choices for the alternative java (providing /usr/bin/java).
    
      Selection    Path                                            Priority   Status
    ------------------------------------------------------------
      0            /usr/lib/jvm/java-7-oracle/jre/bin/java          1072      auto mode
    * 1            /usr/lib/jvm/java-6-oracle/jre/bin/java          1         manual mode
      2            /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java   1071      manual mode
      3            /usr/lib/jvm/java-7-oracle/jre/bin/java          1072      manual mode
    
    
    Press enter to keep the current choice[*], or type selection number:

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

    Re: Installing only one java instance

    OK. Good.

    If you select 0 there, you'll be using Oracle Java 7. If at a later time you want to use OpenJDK, you can select that.

    After you choose Oracle Java 7, I would be interested to see which browser plugin is being used. Do you use Firefox?
    Please read The Forum Rules and The Forum Posting Guidelines

    A thing discovered and kept to oneself must be discovered time and again by others. A thing discovered and shared with others need be discovered only the once.
    This universe is crazy. I'm going back to my own.

  7. #7
    Join Date
    Nov 2014
    Beans
    7

    Re: Installing only one java instance

    Quote Originally Posted by QIII View Post
    OK. Good.

    If you select 0 there, you'll be using Oracle Java 7. If at a later time you want to use OpenJDK, you can select that.

    After you choose Oracle Java 7, I would be interested to see which browser plugin is being used. Do you use Firefox?
    I use chrome. most of the time.

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
  •