"Minecraft" is damaged and can't be opened on Mountain Lion

I'm trying to run Minecraft on Mac OS X Mountain Lion. I downloaded the zip file (link here) from minecraft.net and unzipped it. Double clicked on the icon and it tells me,

"Minecraft" is damaged and can't be opened. You should move it to the Trash.

I've downloaded it several times and 2 other unzipping tools don't complain. Is it some issue with Mountain Lion? I have Java installed with versions as follows:

$ java -version
java version "1.6.0_37"
Java(TM) SE Runtime Environment (build 1.6.0_37-b06-434-11M3909)
Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01-434, mixed mode)

UPDATE: I did the Show Package Contents for minecraft and ran the JavaLauncher on the jar file, seemed to work. But after minecraft updated itself, I got this error:

      Minecraft has crashed!      
      ----------------------      

Minecraft has stopped running because it encountered a problem; Failed to start game

A full error report has been saved to /Users/scott/Library/Application Support/minecraft/crash-reports/crash-2012-11-25_10.25.30-client.txt - Please include a copy of that file (Not this screen!) if you report this crash to anyone; without it, they will not be able to help fix the crash :(



--- BEGIN ERROR REPORT 99374f70 --------
Full report at:
/Users/scott/Library/Application Support/minecraft/crash-reports/crash-2012-11-25_10.25.30-client.txt
Please show that file to Mojang, NOT just this screen!

Generated 11/25/12 10:25 AM

-- System Details --
Details:
    Minecraft Version: 1.4.5
    Operating System: Mac OS X (x86_64) version 10.8.2
    Java Version: 1.7.0_09, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 22467144 bytes (21 MB) / 71499776 bytes (68 MB) up to 1060700160 bytes (1011 MB)
    JVM Flags: 0 total; 
    AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
    Suspicious classes: No suspicious classes found.
    IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
    LWJGL: 2.4.2
    OpenGL: ~~ERROR~~ NullPointerException: null
    Is Modded: Probably not. Jar signature remains and client brand is untouched.
    Type: Client (map_client.txt)
    Texture Pack: ~~ERROR~~ NullPointerException: null
    Profiler Position: N/A (disabled)
    Vec3 Pool Size: ~~ERROR~~ NullPointerException: null[failed to get system properties (java.lang.NullPointerException)]


org.lwjgl.LWJGLException: Could not get the JAWT interface
    at org.lwjgl.opengl.AWTSurfaceLock.lockAndInitHandle(Native Method)
    at org.lwjgl.opengl.AWTSurfaceLock.access$100(AWTSurfaceLock.java:49)
    at org.lwjgl.opengl.AWTSurfaceLock$1.run(AWTSurfaceLock.java:89)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.lwjgl.opengl.AWTSurfaceLock.privilegedLockAndInitHandle(AWTSurfaceLock.java:86)
    at org.lwjgl.opengl.AWTSurfaceLock.lockAndGetHandle(AWTSurfaceLock.java:64)
    at org.lwjgl.opengl.MacOSXCanvasPeerInfo.initHandle(MacOSXCanvasPeerInfo.java:53)
    at org.lwjgl.opengl.MacOSXDisplayPeerInfo.doLockAndInitHandle(MacOSXDisplayPeerInfo.java:56)
    at org.lwjgl.opengl.PeerInfo.lockAndGetHandle(PeerInfo.java:85)
    at org.lwjgl.opengl.MacOSXContextImplementation.create(MacOSXContextImplementation.java:47)
    at org.lwjgl.opengl.Context.<init>(Context.java:120)
    at org.lwjgl.opengl.Display.create(Display.java:858)
    at org.lwjgl.opengl.Display.create(Display.java:784)
    at org.lwjgl.opengl.Display.create(Display.java:765)
    at net.minecraft.client.Minecraft.a(SourceFile:232)
    at net.minecraft.client.Minecraft.run(SourceFile:515)
    at java.lang.Thread.run(Thread.java:722)
--- END ERROR REPORT adc22a49 ----------

Solution 1:

The problem actually was that Mountain Lion gives this nonsensical error message to any app not authorized by Apple or from the App Store, by default. You just have to go to Apple -> System Preferences... -> Security & Privacy -> Allow applications downloaded from:

Then select "Anywhere". Seems like this is useful, but I couldn't get Minecraft to run without disabling this security check.

Solution 2:

I'm having the same issue.

One workaround is to right-click on the file, select Show Package Contents, then go to Contents -> Resources -> Java. Then, just open using MinecraftLauncher.jar. You can make an alias to this for easy access if you want.

I'm guessing that something is damaged/wrong with one of the application files in the Minecraft.app file.

Solution 3:

The java app works fine for me, but launchers can be fragile on OS X. You could try this Minecraft launcher I coded in bash since it would explicitly call java rather than relying on the system to call it:

http://pastebin.com/NEcagTvW

The package is called bashcraft and the source is available on github.

#!/bin/bash
# bashcraft, a minimal Minecraft launcher and updater
# crafted by Alex (Qwertylex), Zarek Jenkinson (akiwiguy) and maybe some more
# see https://github.com/Qwertylex/bashcraft/blob/master/README.md for details
# License: This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.
# To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/