← Back to team overview

openjdk team mailing list archive

[Bug 901758] [NEW] Mixed Java command versions after installing openjdk-7-jdk

 

Public bug reported:

On a new Oneiric i386 machine I ran 'apt-get install openjdk-7-jdk'.
This machine had no Java installed previously.  Installing this package
required installing openjdk-6-jdk, as well as the -jre for both versions
6 & 7.  After the install was complete I was left with this awful
result...

# java -version
java version "1.6.0_23"
OpenJDK Runtime Environment (IcedTea6 1.11pre) (6b23~pre11-0ubuntu1.11.10)
OpenJDK Client VM (build 20.0-b11, mixed mode, sharing)

# javac -version
javac 1.7.0_147

Thats right, my javac command uses JDK7 but my java command uses JRE6.

Looking in /etc/alternatives for symlinks to Java-related executables, i
see 13 links to Java6 programs, and 28 links to Java7 programs.

Here is the alternatives information for 'java' command

# update-alternatives --display java
java - auto mode
  link currently points to /usr/lib/jvm/java-6-openjdk/jre/bin/java
/usr/lib/jvm/java-6-openjdk/jre/bin/java - priority 1061
  slave java.1.gz: /usr/lib/jvm/java-6-openjdk/jre/man/man1/java.1.gz
/usr/lib/jvm/java-7-openjdk-i386/jre/bin/java - priority 1051
  slave java.1.gz: /usr/lib/jvm/java-7-openjdk-i386/jre/man/man1/java.1.gz
Current 'best' version is '/usr/lib/jvm/java-6-openjdk/jre/bin/java'.

And the same for the 'javac' command

# update-alternatives --display javac
javac - auto mode
  link currently points to /usr/lib/jvm/java-7-openjdk-i386/bin/javac
/usr/lib/jvm/java-7-openjdk-i386/bin/javac - priority 1051
  slave javac.1.gz: /usr/lib/jvm/java-7-openjdk-i386/man/man1/javac.1.gz
Current 'best' version is '/usr/lib/jvm/java-7-openjdk-i386/bin/javac'.

** Affects: openjdk-7 (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of OpenJDK,
which is subscribed to openjdk-7 in Ubuntu.
https://bugs.launchpad.net/bugs/901758

Title:
  Mixed Java command versions after installing openjdk-7-jdk

Status in “openjdk-7” package in Ubuntu:
  New

Bug description:
  On a new Oneiric i386 machine I ran 'apt-get install openjdk-7-jdk'.
  This machine had no Java installed previously.  Installing this
  package required installing openjdk-6-jdk, as well as the -jre for
  both versions 6 & 7.  After the install was complete I was left with
  this awful result...

  # java -version
  java version "1.6.0_23"
  OpenJDK Runtime Environment (IcedTea6 1.11pre) (6b23~pre11-0ubuntu1.11.10)
  OpenJDK Client VM (build 20.0-b11, mixed mode, sharing)

  # javac -version
  javac 1.7.0_147

  Thats right, my javac command uses JDK7 but my java command uses JRE6.

  Looking in /etc/alternatives for symlinks to Java-related executables,
  i see 13 links to Java6 programs, and 28 links to Java7 programs.

  Here is the alternatives information for 'java' command

  # update-alternatives --display java
  java - auto mode
    link currently points to /usr/lib/jvm/java-6-openjdk/jre/bin/java
  /usr/lib/jvm/java-6-openjdk/jre/bin/java - priority 1061
    slave java.1.gz: /usr/lib/jvm/java-6-openjdk/jre/man/man1/java.1.gz
  /usr/lib/jvm/java-7-openjdk-i386/jre/bin/java - priority 1051
    slave java.1.gz: /usr/lib/jvm/java-7-openjdk-i386/jre/man/man1/java.1.gz
  Current 'best' version is '/usr/lib/jvm/java-6-openjdk/jre/bin/java'.

  And the same for the 'javac' command

  # update-alternatives --display javac
  javac - auto mode
    link currently points to /usr/lib/jvm/java-7-openjdk-i386/bin/javac
  /usr/lib/jvm/java-7-openjdk-i386/bin/javac - priority 1051
    slave javac.1.gz: /usr/lib/jvm/java-7-openjdk-i386/man/man1/javac.1.gz
  Current 'best' version is '/usr/lib/jvm/java-7-openjdk-i386/bin/javac'.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openjdk-7/+bug/901758/+subscriptions



Follow ups

References