Mixed Java command versions after installing openjdk-7-jdk
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
openjdk-7 (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
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-
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/
/usr/lib/
slave java.1.gz: /usr/lib/
/usr/lib/
slave java.1.gz: /usr/lib/
Current 'best' version is '/usr/lib/
And the same for the 'javac' command
# update-alternatives --display javac
javac - auto mode
link currently points to /usr/lib/
/usr/lib/
slave javac.1.gz: /usr/lib/
Current 'best' version is '/usr/lib/
Status changed to 'Confirmed' because the bug affects multiple users.