Mac OS X Eclipse.app Cant Find Java Virtual Machine [message #327867] |
Tue, 06 May 2008 20:26 |
Eclipse User |
|
|
|
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 #328160 is a reply to message #327867] |
Thu, 15 May 2008 22:37 |
Andrew Niefer 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
>
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03478 seconds