Go Back   The macosxhints Forums > Working with OS X > OS X Developer



Reply
 
Thread Tools Rate Thread Display Modes
Old 06-23-2008, 09:10 AM   #1
albertino13
Registered User
 
Join Date: Jun 2008
Posts: 1
Eclipse JVM terminated / Leopard Java 1.6

hello,

since i upgraded to Java 1.6 Eclipse is not starting anymore.
Eclipse reports the following error message:

JVM terminated
Exit code = -1

Java 1.5 (previous) is not anymore present in JAVA Home directory.

Java Home is set to JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/

Is there anything i can do to recorver Java 1.5 since i assume
Eclipse is looking for this version.
albertino13 is offline   Reply With Quote
Old 06-23-2008, 10:16 AM   #2
hayne
Moderator
 
Join Date: Jan 2002
Location: Montreal
Posts: 29,448
As I recall, Java is fairly self-contained, with almost everything except a few symbolic links being contained under JavaVM.framework.
So you could maybe just restore the old version of that from your backups.

Otherwise, an "archive & install" (checking the box to preserve users) will get you a fresh copy of the whole OS after which you can apply Software Updates to get back to where you should have been.
__________________
hayne.net/macosx.html
hayne is offline   Reply With Quote
Old 06-23-2008, 04:43 PM   #3
blb
All Star
 
Join Date: Jan 2002
Location: CO, USA
Posts: 896
Unless you specifically uninstalled it, 1.5 should still be there. Do you have a
Code:
/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/
Also, launch
Code:
/Applications/Utilities/Java/Java Preferences.app
and check what versions are selected.
blb is offline   Reply With Quote
Old 07-25-2008, 08:04 AM   #4
peetersn
Prospect
 
Join Date: Jul 2008
Posts: 2
I'm having similar issues... I think it's related to the 64-bit platform: see here
http://lists.apple.com/archives/Java.../msg00283.html

Any luck?

Somehow, my Java 1.5.0 has disappeared from the Mac OS, and I can't find a reinstall package anywhere... Help!
peetersn is offline   Reply With Quote
Old 07-25-2008, 08:47 AM   #5
peetersn
Prospect
 
Join Date: Jul 2008
Posts: 2
I have the same problem. I can't find
Code:
/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/
anymore. How can I get this back? I'm running Leopard and it seems that all the packages that Apple propose are only updates from 10.4 (Tiger). the only available update is from Java 5.0 to Java 6.

Also, would it be possible to run Java 6 in 32 mode or something?
peetersn is offline   Reply With Quote
Old 09-06-2008, 01:09 AM   #6
cragkhit
Registered User
 
Join Date: Sep 2008
Posts: 1
Try the script from this web site: http://www.macosxhints.com/article.p...60121171126988
I used it to switch between Java 1.6 and 1.5 and it works pretty well for me.
I faced the same problem and after I switched back to Java 1.5, Eclipse works fine again
cragkhit is offline   Reply With Quote
Old 11-08-2008, 01:32 PM   #7
zacf
Registered User
 
Join Date: Nov 2008
Posts: 1
Switched back, didn't fix it.

I'm having the same problem, even after switching CurrentJDK and Current back to 1.5. I even erased Europa and installed Ganymede, and it didn't solve it.
zacf is offline   Reply With Quote
Old 11-28-2008, 01:41 PM   #8
damnhandy
Prospect
 
Join Date: Nov 2008
Posts: 4
The Eclipse SWT framework doesn't support 64-bit Java. Unlike Swing, SWT uses old-skool Cocoa bindings and those are 32-bit. Until IBM gets around to moving SWT to Cocoa, your only option is to run Eclipse under Java 5. You can do this either by making Java 5 the default JVM, or by editing the Info.plist file and uncommenting this line:

<string>-vm</string><string>/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Commands/java</string>


That allow Eclipse to use Java 5 even though Java 6 is the default. Personally, I'm having a good look at NetBeans.

Ryan-
damnhandy is offline   Reply With Quote
Old 04-17-2009, 07:46 PM   #9
jabraham
Registered User
 
Join Date: Apr 2009
Posts: 1
Unhappy

Quote:
Originally Posted by damnhandy
The Eclipse SWT framework doesn't support 64-bit Java. Unlike Swing, SWT uses old-skool Cocoa bindings and those are 32-bit. Until IBM gets around to moving SWT to Cocoa, your only option is to run Eclipse under Java 5. You can do this either by making Java 5 the default JVM, or by editing the Info.plist file and uncommenting this line:

<string>-vm</string><string>/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Commands/java</string>


That allow Eclipse to use Java 5 even though Java 6 is the default. Personally, I'm having a good look at NetBeans.

Ryan-

I'm having trouble with this. I don't see a line like this in the plist in the eclipse package. Can I just add it to the plist? Or is there another way to make eclipse use 1.6?
jabraham is offline   Reply With Quote
Old 04-18-2009, 01:34 PM   #10
damnhandy
Prospect
 
Join Date: Nov 2008
Posts: 4
You may have to add the lines yourself. Just to reiterate: you cannot get Eclipse, or any Eclipse-based application to execute under Java 6 on Mac OS X. The lines I posted merely tells Eclipse to run under Java 1.5.

Eclipse is built against Carbon (re: not Cocoa) and will only operate under a 32-bit JVM. On OS X, Java 6 is 64-bit only and therefore Eclipse cannot run under Java 6 until 64-bit SWT framework for Mac OS X is in place.

Eclipse 3.5 however will feature a Cocoa version of SWT and be capable of executing in a 64-bit JVM. Hope this helps.

Ryan-
damnhandy is offline   Reply With Quote
Old 01-08-2010, 02:14 PM   #11
Miles Parker
Prospect
 
Join Date: Jan 2010
Posts: 1
Quote:
Originally Posted by damnhandy
Eclipse is built against Carbon (re: not Cocoa) and will only operate under a 32-bit JVM. On OS X, Java 6 is 64-bit only and therefore Eclipse cannot run under Java 6 until 64-bit SWT framework for Mac OS X is in place.

Just a note that this is no longer valid. (You don't need to hack your Java install!) Eclipse *does* now support Java 1.6, 64-bit, and cocoa on OS X. Cocoa builds have been available for over a year now, and since 3.5 they are production. So just grab the cocoa 32 or 64 (preferred) builds form download.eclipse.org and you're golden.
Miles Parker is offline   Reply With Quote
Old 05-07-2009, 06:44 AM   #12
damnhandy
Prospect
 
Join Date: Nov 2008
Posts: 4
Quote:
Originally Posted by jabraham
I'm having trouble with this. I don't see a line like this in the plist in the eclipse package. Can I just add it to the plist? Or is there another way to make eclipse use 1.6?

I should have made note of the fact that I use Text Wranger to edit the plist file rather than the PList editor. If you use a generic text editor, you'll see the hidden values. If you use the PList editor, you have to add those values manually.

Ryan-
__________________
Ryan J. McDonough
http://damnhandy.com
damnhandy is offline   Reply With Quote
Old 05-06-2009, 08:26 PM   #13
pranay
Registered User
 
Join Date: May 2009
Posts: 1
Even I was facing same problems for 2 weeks. I tried changing the Java preferences and running eclipse it was not working. At last I found the way to run it.


If you have installed JDK 1.6 on a 32 bit system, eclipse will not work. To remove the JDK 1.6 you need to remove all versions of Java installed on your system. You can remove that using following command.

sudo rm -rf /System/Library/Frameworks/JavaVM.framework/Versions/

Once you remove java, you can check it using the Terminal and giving command
java -version

Now its time to install JDK 1.5 on your system. To get the Java update visit this link and download and Install this update.

http://www.apple.com/support/downloa...05update2.html


Next step is to set default JDK for your system.
Go to Applications->utilities->Java->Java Preferences
Drag J2SE 5.0 (32 bit) to the top level in both Java Applet Version and Java application Version.


Now you all set
Check the current version using java -version command at termnal.
It will show like

java version "1.5.0_16"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b06-284)
Java HotSpot(TM) Client VM (build 1.5.0_16-133, mixed mode, sharing)

Now run eclipse in normal way, it will come up.

Thanks

-Pranay Kondekar
pranay is offline   Reply With Quote
Old 05-07-2009, 06:37 AM   #14
damnhandy
Prospect
 
Join Date: Nov 2008
Posts: 4
completely removing ALL version of Java on your system is a REALLY BAD idea. OS X ships with multiple versions of the JDK, you do have Java 1.6, 1.5, 1.4.2, 1.4.1. Deleting them all will certainly make your system unfit for most Java applications and pretty much a brain dead approach.

Just to be clear: you cannot run Java 6 on a Mac that does not support 64-bit. If you follow my instructions, you can happily run Eclipse on a system with Java 6 installed. What my suggestion does is simple tell Eclipse to Explicitly use Java 5, which is already installed on your system. Again, Java 5 is ALREADY installed on your system.

Ryan-
damnhandy is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 06:28 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Site design © Mac Publishing LLC; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of Mac Publishing LLC.