RFR: 8286122: [macos]: App bundle cannot upload to Mac App Store due to info.plist embedded in java exe [v2]

Michael Hall mik3hall at gmail.com
Thu May 12 20:58:18 UTC 2022



> On May 12, 2022, at 3:13 PM, Magnus Ihse Bursie <ihse at openjdk.java.net> wrote:
> 
> On Thu, 12 May 2022 04:15:50 GMT, Alexander Matveev <almatvee at openjdk.org> 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.
>> 
>> Alexander Matveev has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>  8286122: [macos]: App bundle cannot upload to Mac App Store due to info.plist embedded in java exe [v2]
> 
> We have the `NSMicrophoneUsageDescription` permission on the `java` launcher in the JDK, since otherwise no Java program can access the mike, even though most won't care. I agree that the situation is different for a jpackaged app, where the developer knows if that permission is needed or not.

I’d have to agree with Apple DTS that this is an interesting exception. 

> 
> Yes, plistbuddy is an official Apple program.
> 
> My understanding of the PR was that native commands are removed by jlink if the user is packaging on a mac for the App Store. I thought this was a workaround that solved the immediate problem of not being able to submit the app to App Store. (However, I don't know how the app is supposed to be started without a launcher…)
> 

I thought that if the app was indicated as intended for the App Store and native commands were also indicated an error would be thrown and the app not built. It doesn’t allow apps that will fail to attempt the App Store but does nothing for getting them there. Switching from an error to a warning and forcing the native commands to be stripped would allow the app into the app store but with unknown functionality probably not working. My understanding. 




More information about the build-dev mailing list