Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Developers: Prevent GateKeeper 'Damaged application' warning on Java apps System 10.8
If you create an application bundle to start a Java application as a regular Mac app, you will get a message that the application is damaged when you try to run it on Mac OS Mountain Lion with GateKeeper active.

The error is caused by the fact that the Java stub application is signed by Apple, and Apple's signature will not be valid for your application.The codesign tool will give the following message:

codesign -d MyJavaApplication.app
MyJavaApplication.app: invalid signature (code or signature have been modified)

The best solution is to sign your application with your Apple Developer key, but if you do not have one you can still sign your application with an ad-hoc key, and replace the Apple signature that will cause this message. To do so run codesign with the following options:

codesign -s - --force MyJavaApplication.app

The user will still have to allow running the application the first time by using the right-click (Control-click) -> Open approach, but at least the user won't see the (incorrect) message that the application is damaged.

Lex adds: I haven't tested this one.
    •    
  • Currently 2.71 / 5
  You rated: 2 / 5 (7 votes cast)
 
[6,754 views]  

Developers: Prevent GateKeeper 'Damaged application' warning on Java apps | 1 comments | Create New Account
Click here to return to the 'Developers: Prevent GateKeeper 'Damaged application' warning on Java apps' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Developers: Prevent GateKeeper 'Damaged application' warning on Java apps
Authored by: mawood40 on Jul 16, '13 09:39:52AM
There is another method to give an unsigned Java application permission to run on 10.8 Macs by using the GUI interface.
  1. Temporarily disable Gatekeeper. Go into System Preferences -> Security & Privacy and temporarily change the setting for "Allow applications downloaded from:" to be "Anywhere".
  2. Run the Java application, the system will tell you that the application was downloaded from the Internet and ask for permission to run it. Allow the application to run.
  3. Terminate the Java application
  4. Change Gatekeeper back to its previous settings (probably "Mac App Store and identified developers")
  5. Run the Java application again, it should just run without issues


[ Reply to This | # ]