Bug#754942: jtreg uses /usr/lib/jvm/default-java/ but does not depend on default-jre-headless

Thomas Klute thomas2.klute at uni-dortmund.de
Wed Jul 16 08:32:05 UTC 2014


Package: jtreg
Version: 4.1-2
Severity: important

While trying to compile the experimental openjdk-8 package from
source, the jtreg test suite completely failed to run with the error
message "Cannot determine version of java to run jtreg".

I found that the reason was that jtreg expects to find a usable JVM in
/usr/lib/jvm/default-java/, unless $JAVA_HOME provides a different
path. However, this default value will fail if default-jre-headless is
not installed, as may well be the case (e.g., I had manually installed
openjdk-7-jdk without any of the default-(jre|jdk)* packages).

Without default-jre-headless:

$ jtreg -version
Cannot determine version of java to run jtreg

With default-jre-headless:

$ jtreg -version
jtreg, version 4.1 src b02
Installed in /usr/share/java/jtreg.jar
Running on platform version 1.6.0_31 from
/usr/lib/jvm/java-6-openjdk-amd64/jre.
Built with 1.6.0_18 on 07/07/2011 03:57 AM.
Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
Use is subject to license terms.

Since jtreg can still be used without default-jre-headless by setting
JAVA_HOME as appropriate, a "Depends" relationship is not warranted,
but "Recommends" or "Suggests" seems reasonable. An alternative
approach would be to simply use the first java binary found in $PATH
by default, which will usually be whatever the administrator has
selected using update-java-alternatives, which also seems reasonable.

The problem also exists in sid (jtreg_4.1-b09-1), although the error
message is more useful because it directly points at the missing
java binary:

$ jtreg -version
/usr/bin/jtreg: 86: /usr/bin/jtreg: /usr/lib/jvm/default-java/bin/java:
not found


-- System Information:
Debian Release: 7.6
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-4-amd64 (SMP w/32 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages jtreg depends on:
ii  javahelp2          2.0.05.ds1-6
ii  libjtharness-java  4.4.0-MR1-Rel-b19-1
ii  libxalan2-java     2.7.1-7+deb7u1

jtreg recommends no packages.

jtreg suggests no packages.

-- no debconf information



More information about the pkg-java-maintainers mailing list