Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Minecraft (and probably some other applications) won't run on a System with the preinstalled Java removed and the current JDK 7 installed. I already symlinked the Java 6 directory to the current one. Other applications like Adobe Illustrator that need Java work with this fix. The error message states no compatible version of java 1.5+ is available.

Screenshot of the error message

What is a reasonable explanation why that application runs on Java 7 on Linux and Windows but not on Mac, and what can be done for it to do so?

Output of /usr/libexec/java_home -V:

Matching Java Virtual Machines (4):
    1.7.0_17, x86_64:   "Java SE 7" /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
    1.7.0_17, x86_64:   "Java SE 7" /Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home
    1.7.0_17, x86_64:   "Java SE 7" /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
    1.7.0_17, x86_64:   "Java SE 7" /System/Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home

/System/Library/Java/JavaVirtualMachines is a Symlink to the /Library/ one, and 1.6.0.jdk is a symlink to jdk1.7.0_17.jdk, terefore only one JDK is being installed.

share|improve this question
    
1  
Yes, I have seen this topics. The second one does adress another issue, which I have adressed before ("I already symlinked the Java 6 directory to the current one"). The first one basically only says to reinstall Java 6. –  Adam S Apr 8 '13 at 3:24
    
What is your current JRE version? –  James Graham Apr 9 '13 at 21:08
    
@JamesGraham java -version java version "1.7.0_17" Java(TM) SE Runtime Environment (build 1.7.0_17-b02) Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode) –  Adam S Apr 9 '13 at 21:15
1  
@AdamS the issue is that Java 7 uses a different Info.plist to Java 6 and so needs to be edited - report as a bug to Minecraft - for details see these answers on SO and AskDifferent -for an app to produce the correct bundle - and there is another great answer on AskDifferent I can't find now –  Mark Apr 13 '13 at 19:33

1 Answer 1

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

share|improve this answer
    
The terminal output is LSOpenURLsWithRole() failed with error -10810 for the file /Applications/Minecraft.app.. Minecraft.app is the latest from the website. How do I find out if my Java installation supports 32 bit? –  Adam S Apr 9 '13 at 22:08
1  
This is the Info.plist of the .app: pastebin.com/baea0VKX . How resp. where can I add x86_64 there? On another note: I could start the game with Minecraft.app/Contents/Resources/java/MinecraftLauncher.jar perfectly, so it definitely has something to do with the .app. –  Adam S Apr 11 '13 at 7:22
1  
I added the config block to your pastbin Info.plist file and re-pasted here: pastebin.com/EVRAvZtv Hope that works. –  Wing Tang Wong Apr 11 '13 at 17:21
1  
Unfortunately it didn't work. I played around with the settings and also other things mentioned here (developer.apple.com/library/mac/#documentation/Java/Reference/…) but it didn't help either. When I tried to remove JVMVersions, it opened, but crashed immediately with the following error message: pastebin.com/CnFHxsBg –  Adam S Apr 11 '13 at 19:54
1  
Like I said, the .jar inside the .app works, and so does the .jar from the website. I was eager to get behind the reason that the .app does not work because the issue is not limited to the Minecraft.app but also Java Preferences.app (I assume to all .app wrapped .jar files.) But it seems that this is something that is not solvable so easily... I'll reward you with the bounty for your effort nevertheless and try to look into this again when I have more time. Thank you so far! –  Adam S Apr 11 '13 at 22:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.