#609170 javahelper: jh_depends doesn't consider --jvm options

#609170#5
Date:
2011-01-07 01:19:41 UTC
From:
To:
jh_depends doesn't consider -j|--jvm option.

Should it override any found jvms? If it should, attached patch.

#609170#8
Date:
2014-12-07 12:04:06 UTC
From:
To:
Control: tags -1 moreinfo

I am currently triaging bugs for javatools and I think jh_depends does
consider the -j|--jvm option.


jh_depends:132

if grep ^Main-Class META-INF/MANIFEST.MF >/dev/null; then
         JHOME="`extractline META-INF/MANIFEST.MF Debian-Java-Home`"
         JVM="`home-to-jvm "$JHOME"`"
fi

jh_depends tries to find the key "Debian-Java-Home" in the Manifest file
which can be set with jh_manifest. If this key is not available  the JVM
variable will be empty and you can override the JVM value because of
this code snippet

if [ -n "`getarg j jvm`" ] && [ -z "$JVM" ]; then
      JVM="`getarg j jvm`"
fi

The script prioritizes "Debian-Java-Home" but I think this is
intentional. Thus I believe this bug report should be closed.

Regards,

Markus