-
Bug
-
Resolution: Fixed
-
P3
-
16, 17, 18
-
b12
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8273241 | 17.0.2 | Andy Herrick | P3 | Resolved | Fixed | b01 |
When a Java application using the microphone on macosx is launched for the first time (using the java launcher), the system will pop up a dialog asking user if it is ok for this app to use the microphone. When the same application is built with jpackage and launched by double clicking on the app in finder, no such dialog will be shown and the microphone access will be blocked.
This has nothing to do with signing the app.
The java launcher's plist has the following entry, that is not present in the plist of the application as generated by jpackage:
<key>NSMicrophoneUsageDescription</key>
<string>The application is requesting access to the microphone.</string>
Adding this property in src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/Info-lite.plist.template fixes this issue.
This has nothing to do with signing the app.
The java launcher's plist has the following entry, that is not present in the plist of the application as generated by jpackage:
<key>NSMicrophoneUsageDescription</key>
<string>The application is requesting access to the microphone.</string>
Adding this property in src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/Info-lite.plist.template fixes this issue.
- backported by
-
JDK-8273241 jpackaged applications using microphone on mac
-
- Resolved
-
- duplicates
-
JDK-8272818 JPackage "ask for microphone permissions" broken on OSX
-
- Closed
-
- relates to
-
JDK-8313579 [macos] Info.plist files should not define NSMicrophoneUsageDescription unless requested
-
- Closed
-
- links to
-
Commit openjdk/jdk17u/da1c0fea
-
Commit openjdk/jdk/b17b821a
-
Review openjdk/jdk17/306
-
Review openjdk/jdk17u/76
-
Review openjdk/jdk/5186
(3 links to)