Java launcher with --module=name[/entry-point]
fails on Windows (original) (raw)
Daniel D. Daugherty daniel.daugherty at oracle.com
Fri Nov 15 15:25:33 UTC 2019
- Previous message: Java launcher with `--module=name[/entry-point]` fails on Windows
- Next message: CFV: New JDK Reviewer: Alexey Ivanov
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Forwarding over to core-libs-dev at ... I think that's where launcher issues are addressed.
Bcc'ing jdk-dev at ...
Dan
On 11/15/19 6:23 AM, Christian Stein wrote:
Hi,
relying on the "Note: To specify an argument for a long option, you can use either --name=value or --name value." from [0] and assuming that
--module
is a long option (with-m
being its short counterpart) I think I found an error injava.exe
. The brief history of the search is recorded at JBS [1], and yesterday, I managed to create a minimal, complete and verifiable example at [2] -- which contains a README.md file with more details. Here's a gist: Callingjava --module-path=lib --module=m/Main --help ...
sometimes fails to launch the JVM. The failure, if it occurs, expresses mostly via a silent exit of thejava.exe
program leaving a negative value in the "DOS shell"ERRORLEVEL
environment variable. Seldom, a fatal error log is written to the current working directory. The underlying reason seems to be an error in the calculation of the application argument count and index. The later reads: AppArgIndex: -1 points to (null) Work-around: omit the=
(equals sign) after--module
and the entry-point, herem/Main
. This command line always gets the JVM up and running. Cheers, Christain [0] https://docs.oracle.com/en/java/javase/11/tools/java.html [1] https://bugs.openjdk.java.net/browse/JDK-8234076 [2] https://github.com/sormuras/JDK-8234076
- Previous message: Java launcher with `--module=name[/entry-point]` fails on Windows
- Next message: CFV: New JDK Reviewer: Alexey Ivanov
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]