If jar tool options are written with the new gnu style, then if the --release option is specified before any files are specified, the
--release option is treated as an unrecognized option. The work around is to use the old style options until this issue is fixed.
These examples fail:
jar --create --file=test.jar --release 9 test1
jar --create --file=test.jar -C test1 .
jar --update --file=test.jar --release 9 -C test1 .
And these examples do not fail:
jar cf test.jar --release 9 test1
jar -cf test.jar -C test1 .
jar -uf test.jar --release 9 -C test1 .
jar --create --file=test.jar -C test1 .
jar --update --file=test.jar test2 --release 9 -C test1 .
--release option is treated as an unrecognized option. The work around is to use the old style options until this issue is fixed.
These examples fail:
jar --create --file=test.jar --release 9 test1
jar --create --file=test.jar -C test1 .
jar --update --file=test.jar --release 9 -C test1 .
And these examples do not fail:
jar cf test.jar --release 9 test1
jar -cf test.jar -C test1 .
jar -uf test.jar --release 9 -C test1 .
jar --create --file=test.jar -C test1 .
jar --update --file=test.jar test2 --release 9 -C test1 .
- relates to
-
JDK-8316804 Gracefully handle the case where --release is not specified last
-
- Open
-