Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Unable to locate a Java Runtime to invoke?

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 Prefrences.app 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

Posted on Mar 10, 2011 3:05 AM

Reply
Question marked as Best reply

Posted on Mar 10, 2011 4:56 AM

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"
21 replies

Jun 10, 2012 1:34 PM in response to Dan Jackson

hey dan jackson,

I had a version of java installed but after installing and running matlab I ran into the "unable to locate a java runtime to invoke" error.

I downloaded the file from the link, opened it with Pacifist installing the 4 folders to their default location.

after restarting my mac, not only does "java -version" return the same "unable to locate a java runtime to invoke" message but also the Java Preferences app does not open: "No compatible version of Java 1.5+ is available." (it did before I reinstalled java)


any idea?

thanks in advance

Unable to locate a Java Runtime to invoke?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.