find_java_runtime finds only latest java, even if others are installed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
java-wrappers (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
function find_java_runtime will only find latest java installed, regardless of other java versions available.
find_java_runtime java11 -> echo $JAVA_CMD -> /usr/lib/
find_java_runtime java10 -> echo $JAVA_CMD -> /usr/lib/
find_java_runtime java9 -> echo $JAVA_CMD -> /usr/lib/
find_java_runtime java8 -> echo $JAVA_CMD -> /usr/lib/
find_java_runtime java7 -> echo $JAVA_CMD -> /usr/lib/
but:
# ll /usr/lib/jvm
total 72K
drwxr-xr-x 6 root root 4.0K Oct 3 03:01 ./
drwxr-xr-x 292 root root 44K Oct 3 13:10 ../
drwxr-xr-x 4 root root 4.0K Oct 2 06:07 java-1.
drwxr-xr-x 4 root root 4.0K Oct 2 06:07 java-1.
drwxr-xr-x 7 root root 4.0K Oct 2 06:35 java-7-
drwxr-xr-x 7 root root 4.0K Oct 2 06:35 java-8-
drwxr-xr-x 7 root root 4.0K Oct 2 06:35 java-9-
drwxr-xr-x 7 root root 4.0K Oct 2 06:35 java-10-
drwxr-xr-x 9 root root 4.0K Oct 2 06:36 java-11-
lrwxrwxrwx 1 root root 25 Apr 8 15:16 default-java -> java-1.
lrwxrwxrwx 1 root root 20 Jul 21 2016 java-1.
lrwxrwxrwx 1 root root 20 Jul 21 2016 java-1.
lrwxrwxrwx 1 root root 20 Jul 21 2016 java-1.
lrwxrwxrwx 1 root root 20 Jul 21 2016 java-1.
lrwxrwxrwx 1 root root 21 Aug 24 19:36 java-1.
ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: java-wrappers 0.3
ProcVersionSign
Uname: Linux 4.15.0-36-generic x86_64
ApportVersion: 2.20.9-0ubuntu7.4
Architecture: amd64
CurrentDesktop: XFCE
Date: Wed Oct 3 16:37:57 2018
Dependencies:
gcc-8-base 8.2.0-1ubuntu2~
libbz2-1.0 1.0.6-8.1
libc6 2.27-3ubuntu1
libgcc1 1:8.2.0-
unzip 6.0-21ubuntu1
InstallationDate: Installed on 2011-10-19 (2540 days ago)
InstallationMedia: Xubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
PackageArchitec
SourcePackage: java-wrappers
UpgradeStatus: Upgraded to bionic on 2018-10-02 (1 days ago)
Actually I did:
unset JAVA_CMD; find_java_runtime java8; echo $JAVA_CMD