Make Minecraft (or Java Preferences.app) run on Java 7
Minecraft for the Mac and other Java applications are routinely packed with Apple's JavaApplicationStub. JavaApplicationStub is a small program that decodes the Info.plist inside the application, detects Apple Java (6), shows the "To open this application you need to install the legacy Java SE 6 runtime" error message (if Apple Java isn't installed) and finally invokes Apple Java with the correct arguments to make the app go. The trouble is that JavaApplicationStub is hardwired with Apple Java detection and loading. JavaApplicationStub will almost never invoke Oracle Java, no matter what arguments you feed it or how you try to trick it into invoking Oracle Java.
The first step is to modify the Info.plist file in Minecraft to take JavaApplicationStub out of the loop and replace it with something that is Oracle Java friendly. universalJavaApplicationStub is a bash script that auto detects Oracle Java or Apple Java and invokes the app. I've described the process in a blog post to make Minecraft for Mac work no matter what Java is installed:
http://svexpertise.blogspot.com/2015/08/make-mac-minecraft-work-on-oracle-java.html
Pretty much all solutions cope with JavaApplicationStub. Some involve satisfying it (by installing Apple Java), some involve avoiding it (by invoking the .jar directly) and some involve replacing it (by installing a custom bash script or universalJavaApplicationStub).
What is the terminal output stating the error?
Looking at this discussion:
http://www.linuxquestions.org/questions/linux-games-33/minecraft-not-running-on-java-7-a-929983/
The error output indicates that the Minecraft Java binaries are linked against 32bit versions. Looks like you have 64bit installed. Does your Java7 installation support 32bit?
Also, are you running the latest Minecraft code/mod updates/etc?
Edit:
Given the error message in the answer, it lead me to this:
2 things are needed to be changed to make it run on OSX x64 and this is what i done..
1) add in x86_64 to the Info.plist as follows:
JVMArchs
i386
x86_64
ppc
2) Set the execute flag on the JavaApplicationStub file
chmod +x /Applications/Minecraft.app/Contents/MacOS/JavaApplicationStub
now it works :)
That was found at:
https://getsatisfaction.com/mojang/topics/osx_x86_64_minecraft_execution_fixed
Via:
http://www.minecraftforum.net/topic/487766-fixed-lsopenurlswithrole-failed-with-error-10810/
Regarding checking java version:
$ java -version
java version "1.6.0_43"
Java(TM) SE Runtime Environment (build 1.6.0_43-b01-447-11M4203)
Java HotSpot(TM) 64-Bit Server VM (build 20.14-b01-447, mixed mode)
Indicates 64bit server VM in mixed mode. When testing with '-d32' and 'd64', the java runtime should report back with a help screen vs erroring out, though this doesn't rule out 32bit/64bit libraries in the paths that are missing.
java -d32
java -d64
But the chmod above might help more.
Note, I don't use Minecraft.app to start up MineCraft when I run it on a Mac. I do the following:
My wrapper script:
#!/usr/bin/env bash
java -Xmx3048M -Xms2024M -cp "$1" net.minecraft.LauncherFrame
And I run it by:
./run-minecraft minecraft.jar
I have the parameter because sometimes, I like running 3rd party wrappers around the MineCraft application itself.
AddOn:
Btw, this is the alternate method I use to fire up MineCraft, since MineCraft.app on the Mac has never worked reliably for me.
- http://minecraft.net/download
- Download the JAR file for "Minecraft for Linux / Other"
-
Test firing up with:
java -Xmx1024M -Xms512M -cp minecraft.jar net.minecraft.LauncherFrame