On Wed, 11 May 2022 21:31:44 GMT, Alexander Matveev <[email protected]>
wrote:
> - It is not possible to support native JDK commands such as "java" inside Mac
> App Store bundles due to embedded info.plist. Workarounds suggested in
> JDK-8286122 does not seems to be visible.
> - With proposed fix we will enforce "--strip-native-commands" option for
> jlink, so native JDK commands are not included when generating Mac App Store
> bundles.
> - Custom runtime provided via --runtime-image should not contain native
> commands as well, otherwise jpackage will throw error.
> - Added two tests to validate fix.
Changes requested by asemenyuk (Reviewer).
test/jdk/tools/jpackage/macosx/MacAppStoreRuntimeTest.java line 102:
> 100:
> 101: cmd.execute(1);
> 102: }
@Test
@Parameter("true")
@Parameter("false")
public static void test(boolean stripNativeCommands) throws Exception {
JPackageCommand cmd = JPackageCommand.helloAppImage();
cmd.addArguments("--mac-app-store", "--runtime-image",
getRuntimeImage(stripNativeCommands));
if (stripNativeCommands) {
cmd.executeAndAssertHelloAppImageCreated();
} else {
cmd.execute(1);
}
}
-------------
PR: https://git.openjdk.java.net/jdk/pull/8666