How to suppress verbosity when settting _JAVA_OPTIONS?

John Paul Adrian Glaubitz glaubitz at physik.fu-berlin.de
Mon Sep 4 11:18:30 UTC 2017


Hello!

I'm currently testing Zero builds on Linux Alpha, in my particular case on
QEMU in a Debian unstable alpha chroot, using OpenJDK 8 for bootstrapping.

For some reason, OpenJDK 8 from Debian's openjdk8 assumes a heap size which
is too small and refuses to start:

(sid-alpha-sbuild)root at nofan:/# java -version
Error occurred during initialization of VM
Too small initial heap
(sid-alpha-sbuild)root at nofan:/#

This can be fixed by overriding the heap settings with _JAVA_OPTIONS:

(sid-alpha-sbuild)root at nofan:/# export _JAVA_OPTIONS="-Xmx1024m -Xms256m"
(sid-alpha-sbuild)root at nofan:/# java -version
Picked up _JAVA_OPTIONS: -Xmx1024m -Xms256m
openjdk version "1.8.0_141"
OpenJDK Runtime Environment (build 1.8.0_141-8u141-b15-3-b15)
OpenJDK 64-Bit Zero VM (build 25.141-b15, interpreted mode)
(sid-alpha-sbuild)root at nofan:/#

As you can see, this has the side effect that the JVM becomes very
chatty about the fact that _JAVA_OPTIONS were set.

While this doesn't seem to be a problem at first sight, it becomes
a problem when trying to run configure for JDK10 which will fail
because of the unexpected output when trying to determine the version
of the boot JDK:

configure: Found potential Boot JDK using configure arguments
configure: Potential Boot JDK found at /usr/lib/jvm/java-8-openjdk-alpha/ is incorrect JDK version (Picked up _JAVA_OPTIONS: -Xmx1024m -Xms256m); ignoring
configure: (Your Boot JDK must be version 8 or 9)
configure: error: The path given by --with-boot-jdk does not contain a valid Boot JDK
configure exiting with result code 1

Is there any way to silence the JVM regarding "_JAVA_OPTIONS"? If no,
we should probably patch the JVM to do that by default.

Adrian

-- 
  .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz at debian.org
`. `'   Freie Universitaet Berlin - glaubitz at physik.fu-berlin.de
   `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913


More information about the hotspot-dev mailing list