Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Mac OS X Eclipse.app Cant Find Java Virtual Machine
Mac OS X Eclipse.app Cant Find Java Virtual Machine [message #327867] Tue, 06 May 2008 20:26 Go to next message
Eclipse UserFriend
Originally posted by: ar5.ecs.soton.ac.uk

Hi,

i have had eclipse 3.3.2 installed for a while, and something else i
installed seems to have broken the Eclipse.app bundle. It was working
fine for a month or so, and suddenly, now when i open the Eclipse.app, i
get the following message:

---------------
A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be
available in order to run Eclipse.

No Java Virtual Machine
was found after searching the following locations:
/Applications/eclipse/Eclipse.app/Contents/MacOS/jre/bin
java
java in your current PATH
----------------

Running the eclipse shortcut, or running the executable in the Eclipse.app
bundle, will open eclipse fine.

I have tried creating sybolic links between
Eclipse.app/Contents/MacOS/jre/bin and the current
/System/Library/Frameworks/JavaVM.framework/Versions/Current / (and other
combinations of that path)

I have tried adding the java home and java path to my local .profile,
although i didn;t think this would make any difference since shell
environment variables are not accessible to the .app anyway?

ive tried adding some stuff to the info.plist and eclipse.ini in the
Eclipse.app bundle.

I have tried removing the application and re-downloading etc. Not sure
what else to remove other than the eclipse application directory.

Nothing seems to work.

Anyone have any ideas?

This is on a penryn 17 MacBook pro, with fresh install of Leopard, and all
the latest updates, including the java 1.5 update 1 for mac os x 10.5.

Thanks

Alistair
Re: Mac OS X Eclipse.app Cant Find Java Virtual Machine [message #328063 is a reply to message #327867] Tue, 13 May 2008 13:54 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ar5.ecs.soton.ac.uk

Has no-one had any experience with this error?
Re: Mac OS X Eclipse.app Cant Find Java Virtual Machine [message #328160 is a reply to message #327867] Thu, 15 May 2008 22:37 Go to previous messageGo to next message
Andrew Niefer is currently offline Andrew NieferFriend
Messages: 990
Registered: July 2009
Senior Member
I've not seen this problem before.

With nothing specified with -vm, it is looking for a file "java" and
will search your path for it. Generally it would find "/usr/bin/java"
which would be a symlink to some java under JavaVM.framework.

It also looks under the jre beside the executable, so you could symlink
Eclipse.app/Contents/MacOS/jre/bin/java (or bin to a directory
containing a java).

If you specify a -vm argument it should point to a "java", or to a
directory containing a "java".

All of this is by virtue of sharing the same code as all the other
platforms. However, because you are on the Mac, you are a slightly
special case.

Ultimately on the Mac, what will really happen, independent of which
java was found, is that we will load the
"/System/Library/Frameworks/JavaVM.framework" bundle. Which "java" was
found really just helps decide which version you get. I have not
actually tried it (and not something I would generally recommend), but
you might be able to cheat and just give a -vm pointing to any arbitrary
file that exists, this could fake it out and load the java framework
bundle without trying to specify a version.

-Andrew

Ali wrote:
> Hi,
> i have had eclipse 3.3.2 installed for a while, and something else i
> installed seems to have broken the Eclipse.app bundle. It was working
> fine for a month or so, and suddenly, now when i open the Eclipse.app, i
> get the following message:
>
> ---------------
> A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be
> available in order to run Eclipse.
>
> No Java Virtual Machine
> was found after searching the following locations:
> /Applications/eclipse/Eclipse.app/Contents/MacOS/jre/bin
> java
> java in your current PATH
> ----------------
>
> Running the eclipse shortcut, or running the executable in the
> Eclipse.app bundle, will open eclipse fine.
>
> I have tried creating sybolic links between
> Eclipse.app/Contents/MacOS/jre/bin and the current
> /System/Library/Frameworks/JavaVM.framework/Versions/Current / (and other
> combinations of that path)
>
> I have tried adding the java home and java path to my local .profile,
> although i didn;t think this would make any difference since shell
> environment variables are not accessible to the .app anyway?
>
> ive tried adding some stuff to the info.plist and eclipse.ini in the
> Eclipse.app bundle.
>
> I have tried removing the application and re-downloading etc. Not sure
> what else to remove other than the eclipse application directory.
>
> Nothing seems to work.
>
> Anyone have any ideas?
>
> This is on a penryn 17 MacBook pro, with fresh install of Leopard, and
> all the latest updates, including the java 1.5 update 1 for mac os x 10.5.
>
> Thanks
>
> Alistair
>
Re: Mac OS X Eclipse.app Cant Find Java Virtual Machine [message #695721 is a reply to message #327867] Tue, 12 July 2011 12:04 Go to previous messageGo to next message
valerossi4674 is currently offline valerossi4674Friend
Messages: 5
Registered: July 2011
Junior Member
My god, I have the same problem and did the exact same scenarios as you and nothing helped. I also can start eclipse from that shortcut but not from Eclipse.app.
Re: Mac OS X Eclipse.app Cant Find Java Virtual Machine [message #1597765 is a reply to message #327867] Mon, 02 February 2015 14:42 Go to previous message
Matthieu Wipliez is currently offline Matthieu WipliezFriend
Messages: 30
Registered: March 2010
Member
I know this is an old thread, but since I haven't seen any way to solve this problem until a few minutes ago, I figured it might help others to know that it is actually possible to run an Eclipse-based product with a bundled JRE on OS X. The -vm option should not point to the java executable but to the libjli.dylib, see the details in this bug report: https://bugs.eclipse.org/bugs/show_bug.cgi?id=449428#c6
Previous Topic:ClearQuest Plugin
Next Topic:How long does eclipse platform be tested?
Goto Forum:
  


Current Time: Tue Apr 16 12:24:51 GMT 2024

Powered by FUDForum. Page generated in 0.98648 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top