Script generated using jlink --launcher doesn't espace arguments
Mandy Chung
mandy.chung at oracle.com
Fri Mar 15 05:00:23 UTC 2019
I have created https://bugs.openjdk.java.net/browse/JDK-8220700
for this issue.
A better solution would be to get the native launcher support [1]
to replace this stop-gap generated script.
Mandy
[1] https://bugs.openjdk.java.net/browse/JDK-8182555
On 3/14/19 7:49 AM, lists at bendem.be wrote:
> Hi,
>
> Not quite sure where to report this, but it's a pretty annoying bug
making scripts generated using the --launcher parameter unusable for
applications accepting complex command line arguments.
>
> When generating a launcher script using jlink, the generated script
doesn't escape the arguments it passes through.
>
> The command used to generate the jlink'd image from a maven output:
>
> jlink --output jlinked \
> -p ../target/libs/:../target/log-timing-parser-1.0.0.jar \
> --add-modules be.yelido.logtimingparser,ch.qos.logback.classic,java.naming \
> --no-header-files \
> --no-man-pages \
> --strip-debug \
> --compress=2 \
> --launcher log-timing-parser=be.yelido.logtimingparser/be.yelido.logtimingparser.Main
>
> The generated script:
>
> $ cat jlinked/bin/log-timing-parser
> #!/bin/sh
> JLINK_VM_OPTIONS=
> DIR=`dirname $0`
> $DIR/java $JLINK_VM_OPTIONS -m be.yelido.logtimingparser/be.yelido.logtimingparser.Main $@
>
> The expected script:
>
>
> $ cat jlinked/bin/log-timing-parser
> #!/bin/sh
> JLINK_VM_OPTIONS=
> DIR=`dirname $0`
> $DIR/java $JLINK_VM_OPTIONS -m be.yelido.logtimingparser/be.yelido.logtimingparser.Main "$@"
>
More information about the jigsaw-dev
mailing list