Previous 1 2 Next 21 Replies Latest reply: Jul 22, 2013 10:57 PM by epinapala
sarukuku Level 1 (0 points)
Hi guys,

I have a quite new MacBook Pro (just a couple of moths old) and it has a problem with Java.

When I try to open some java applications I get a system message box telling me this: "Cannot launch 'Program xxx' No compatible version of Java 1.5 is available."

I have updated to the recent java provided from apple and even tired to re-install it once.

If I try to access the Utilities/Java it throws quite the same message as trying to run any other java app: "Cannot launch 'Java Prefrences' No compatible version of Java 1.5+ is available."

I've run some terminal commands and the tell there is a problem with the system finding the java runtime environment. Some terminal commands and their outputs:

$ java -version
Unable to locate a Java Runtime to invoke.

$ /usr/libexec/java_home --verbose
Unable to find any JVMs matching version "(null)".
Matching Java Virtual Machines (0):
Default Java Virtual Machines (0):
Unable to find any system-provided Java.

$ ls -al /System/Library/Java/JavaVirtualMachines
total 0
drwxr-xr-x 3 root wheel 102 9 Maa 15:33 .
drwxr-xr-x 6 root wheel 204 9 Maa 15:33 ..
drwxr-xr-x 3 root wheel 102 1 Maa 01:52 1.6.0.jdk

$ ls -al /Library/Java/JavaVirtualMachines
total 0
drwxrwxr-x 3 root admin 102 23 Hel 21:11 .
drwxrwxr-x 5 root admin 170 9 Maa 15:33 ..
drwxrwxr-x 3 root admin 102 1 Maa 01:48 1.6.0_24-b07-334.jdk

$ echo $JAVA_HOME
Returns nothing.

I'd really appreciate if any of you guys could help me. I've done what I can.

MacBook Pro 2.4GHz Intel Core i5, Mac OS X (10.6.6), Wireless Aluminium Keyboard + Mighty Mouse + 27" Fujitsu external display
  • stderr Level 1 (5 points)
    same problem here after installing the new java update:
    "Java Developer Package for Mac OS X 10.6 Update 4 (Disk Image) 133.4 MB 07 Mar 2011"
  • sarukuku Level 1 (0 points)
    I tried fixing the java problem by installing that exactly same package but it didn't fix it. This might be the key to our problem. Installing the developer package broke runtime environment or at least made the system think it's missing.

    Message was edited by: sarukuku
  • Tristan Lips Level 1 (0 points)
    Same problem. Cannot launch "altitude" - No compatible version of Java 1.5+ is available.

    There's then an option to Open Java Preferences and that comes back with a similar error message:
    Cannot launch "Java Preferences" - No compatible version of Java 1.5+ is available.

    Seems that there may be a method to roll back to an earlier version that works:

    Message was edited by: Tristan Lips
  • sarukuku Level 1 (0 points)
    Hi guys!

    Good news is that I maged to fix this problem.
    Bad news: It's not that "easy" as I'd wish.

    If you follow the instruction below it's up to you. I guarantee nothing but it fixed my problem and I didn't even had to restore any information from a backup I made because the installer didn't remove any of my files but updated / re-installed all the system files.

    So, what did I do?

    1. Backup everything.
    2. Insert the system disk that came with your computer and start the installer from the desktop to re-install the system. Before doing this make sure the disk contains the same system you are running already. Example: you have SL installed and the disk that came with your computer has some version of SL. OK!
    3. Update the system via Software update when it has been re-installed.
    4. The problem is gone!

    You can try if the problem is gone by trying to launch the Java or typing java in terminal.

    Hope this helps someone!

    Message was edited by: sarukuku
  • stderr Level 1 (5 points)
    Thanks sarukuku,

    I also tried to reinstall the system. After the reinstallation, the java works good. However, after upgrade to java update 4, java failed again

    Now I do not dare to install any java update after reinstallation again.
  • etstanger Level 1 (0 points)
    I'm also having this problem. None of my java-based apps are running. Are there any other options besides re-installing the OS?
  • Dan Jackson Level 1 (0 points)



    What I did:


    1) Go to

    2) Download Pacifist

    3) Open the pkg with Pacifist then when you have navigated to the folders:

    • Applications
    • Library
    • System
    • usr

    Right click each one and select 'Install to default location'

    4) Replace each file (even if it asks to overwrite) and that should be it.

  • Victor M. Melendez Level 1 (0 points)

    Hey Dan,


    I was having the same problem like everyone on this page until your mac genius solution sprung up on this page. Thanks so much.




  • etstanger Level 1 (0 points)

    Goodness gracious. This worked like a charm! Thank you so very much!

  • rosesage Level 1 (0 points)

    Thanks for posting this!  It saved me so much time.

  • guenterfromvienna Level 1 (0 points)
  • keesbriggs Level 1 (0 points)

    I recently ran into this same error, suddenly and out of the blue, followed these instructions (the ones involving Pacifist packager, etc) and it worked perfectly and saved me from what seemed like an arduous debug. Thanks for posting!

  • jerry16821 Level 1 (0 points)

    Ohh, dear. Thank you, Dan Jackson, for saving my life. I appreciate it.
    I followed the instructions,

    Downloaded that first side link on the first step,

    Opened it with the second step,
    "Updated" everything,
    Tried reinstalling my program again and it worked.


    Thank you, so much.

  • Level 1 (0 points)

    The fix didn't work for me..


    I'm running lion and before the fix it gave me the error "no compatible version of java 1.5+"

    But java preferences did work, only it would not save my preferences. So when it turned java on and close the preferences next time i opened the preferences it would be off again.

    So i decided to do the pacifist fix, but now nothing works anymore also not the java preferences.


    *thinking of the good old snow leopard days...and windows

Previous 1 2 Next