#420: fix detection of java version when JAVA_TOOL_OPTIONS is set by glhez · Pull Request #426 · codehaus-plexus/plexus-compiler (original) (raw)

I don't see what you means and I can't work on that now (PC broken and I don't want to mess with the one I use now).

The loop seems "difficult", but as far as I remember, I looked for the error message in JDK and calls here : https://github.com/openjdk/jdk/blob/81e43114eca5199a0d816c02f50ecb6bc370135b/src/hotspot/share/runtime/arguments.cpp#L3074

I am more or less doing a job of removing the line sent by parse_options_environment_variable.

Another alternative I did not try would be probably to remove the offending env variable which might or not requires a patch to https://codehaus-plexus.github.io (if that's the good repo) or avoid inheriting them.