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)
codesign -s - --force MyJavaApplication.app
Mac OS X Hints
http://hints.macworld.com/article.php?story=20130715141650672