All other cases check the Java runtime instead the forked instance, that's much easier. The -Xpatch is only interesting if target/classes/module-info.class exists. So I'd go for that strategy. In fact, that's what the maven-compiler-plugin will do too to decide if it should use classpath or modulepath (or both).

Robert


On Tue, 23 Aug 2016 12:14:46 +0200, Tibor Digana <tibor.dig...@googlemail.com> wrote:

I want to obtain java.specification.version from forked JVM started from
Toolchain.
I need to know if the JDK is Jigsaw 9 or lower.
Robert gave me advise to run "java -version" and parse the string but the
problem is that it is VM version and not the specification version of Java
language, and maybe vendor specific.

I can call this: but I have to then create a jar or run class.

CommandLineUtils#executeCommandLineAsCallable()

from maven-shared-utils.


Do we have any Maven artifact simply embedding all this and just returning
the version 1.8, 9, or so?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to