Results 1 to 3 of 3

Thread: How many Java version should be installed

  1. #1
    Join Date
    Apr 2015
    Location
    Indiana
    Posts
    87

    Default How many Java version should be installed

    I took an Android application development course a few months ago and I had to install JDK along with Android Studio and Eclipse. I removed those applications from my computer but when I check my java version and I run the update-alternative command I get the following response. Should I have two versions of java installed at the same time?

    Code:
    bryan@FamilyDesktop:~> java -version
    openjdk version "1.8.0_121"
    OpenJDK Runtime Environment (IcedTea 3.3.0) (suse-21.4-x86_64)
    OpenJDK 64-Bit Server VM (build 25.121-b13, mixed mode)
    bryan@FamilyDesktop:~> sudo update-alternatives --config java
    root's password:
    There are 2 choices for the alternative java (providing /usr/bin/java).
    
      Selection    Path                                       Priority   Status
    ------------------------------------------------------------
    * 0            /usr/lib64/jvm/jre-1.8.0-openjdk/bin/java   1805      auto mode
      1            /usr/lib64/jvm/jre-1.7.0-openjdk/bin/java   1705      manual mode
      2            /usr/lib64/jvm/jre-1.8.0-openjdk/bin/java   1805      manual mode
    Bryan Sailer
    SpaceMonkey
    openSUSE LEAP 15.1
    KDE
    "Don't sweat the small stuff, it's all small stuff"

  2. #2
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    10,920
    Blog Entries
    2

    Default Re: How many Java version should be installed

    Quote Originally Posted by bryansailer View Post
    I took an Android application development course a few months ago and I had to install JDK along with Android Studio and Eclipse. I removed those applications from my computer but when I check my java version and I run the update-alternative command I get the following response. Should I have two versions of java installed at the same time?

    Code:
    bryan@FamilyDesktop:~> java -version
    openjdk version "1.8.0_121"
    OpenJDK Runtime Environment (IcedTea 3.3.0) (suse-21.4-x86_64)
    OpenJDK 64-Bit Server VM (build 25.121-b13, mixed mode)
    bryan@FamilyDesktop:~> sudo update-alternatives --config java
    root's password:
    There are 2 choices for the alternative java (providing /usr/bin/java).
    
      Selection    Path                                       Priority   Status
    ------------------------------------------------------------
    * 0            /usr/lib64/jvm/jre-1.8.0-openjdk/bin/java   1805      auto mode
      1            /usr/lib64/jvm/jre-1.7.0-openjdk/bin/java   1705      manual mode
      2            /usr/lib64/jvm/jre-1.8.0-openjdk/bin/java   1805      manual mode
    What you're seeing is acceptable,
    update-alternatives allows you to have multiple versions of something (java included) installed simultaneously, and to be able to switch between them as you wish.

    Your output says you have both Java 7 and Java 8 installed, and currently your machine is configured to use Java 8.
    You can remove the openjdk 1.7 packages if you want, but is probably unnecessary unless you have some special reason.

    You you want to test how your update-alternatives looks with Java 7 enabled, you can use the "-config" option as follows (and switch back to Java 8 afterwards if you wish)
    Code:
    update-alternatives --config java
    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  3. #3
    Join Date
    Apr 2015
    Location
    Indiana
    Posts
    87

    Default Re: How many Java version should be installed

    Thank you for the response. I had thought that it was the way you mentioned but I wanted to get a second opinion.
    Bryan Sailer
    SpaceMonkey
    openSUSE LEAP 15.1
    KDE
    "Don't sweat the small stuff, it's all small stuff"

Posting Permissions

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