Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

jesseandcatie

macrumors newbie
Original poster
Sep 27, 2005
1
0
OK...I'm hardly a programmer, but I have to take a JAVA class as part of my Masters Degree and I'm having issues getting 1.5.0 to be recognized in Eclipse. If anyone has experience with this, could you please help. I have set 1.5.0 as the Default, but Eclipse is not seeing it under its preferences. When I search for it under the Installed JREs menu I get:
"No JREs found in /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home"
This is the similar directory that is used for the older JREs, so I don't know what to do. 5.0 is set as the default everywhere else, just not in Eclipse. This means much of my code will not compile making it a little cumbersome to test out my programs. I'm relatively new to Macs and I'm not a programmer to begin with so this is about as easy for me as deciphering hieroglyphics.

Anyone that has a clue, please help! Thanks

Jesse
 

Heath

macrumors regular
Aug 19, 2005
133
0
Canada
Java 1.5 on OSX

jesseandcatie said:
OK...I'm hardly a programmer, but I have to take a JAVA class as part of my Masters Degree and I'm having issues getting 1.5.0 to be recognized in Eclipse. If anyone has experience with this, could you please help. I have set 1.5.0 as the Default, but Eclipse is not seeing it under its preferences. When I search for it under the Installed JREs menu I get:
"No JREs found in /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home"
This is the similar directory that is used for the older JREs, so I don't know what to do. 5.0 is set as the default everywhere else, just not in Eclipse. This means much of my code will not compile making it a little cumbersome to test out my programs. I'm relatively new to Macs and I'm not a programmer to begin with so this is about as easy for me as deciphering hieroglyphics.

Anyone that has a clue, please help! Thanks

Jesse


First I assume it does not work from the command line in Terminal either.
Open terminal and run java - version

If you do not see this :
$ java -version
java version "1.5.0_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_02-56)
Java HotSpot(TM) Client VM (build 1.5.0_02-36, mixed mode, sharing)

Then java 5 is not set up properly on your machine.

To do that, in terminal type the following commands:

$ cd /System/Library/Frameworks/JavaVM.framework/Versions
$ sudo mv Current Current.old
$ sudo ln -s 1.5 Current

(taken from http://jmesnil.net/weblog/2005/05/02/using-java-15-on-mac-os-x-tiger/)

Now see if Eclipse will pick up the new Java VM
 

mrichmon

macrumors 6502a
Jun 17, 2003
873
3
Heath said:
First I assume it does not work from the command line in Terminal either.
Open terminal and run java - version

If you do not see this :
$ java -version
java version "1.5.0_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_02-56)
Java HotSpot(TM) Client VM (build 1.5.0_02-36, mixed mode, sharing)

Then java 5 is not set up properly on your machine.

To do that, in terminal type the following commands:

$ cd /System/Library/Frameworks/JavaVM.framework/Versions
$ sudo mv Current Current.old
$ sudo ln -s 1.5 Current

(taken from http://jmesnil.net/weblog/2005/05/02/using-java-15-on-mac-os-x-tiger/)

Now see if Eclipse will pick up the new Java VM

Alternatively, assuming Java 1.5 is installed correctly on the machine (test using "java -version" on the command line as mentioned above) you can simply set up eclipse to use the 1.5 JVM directly rather than messing with changing the current system JVM folders.

To set Eclipse to use the 1.5 JVM, open Eclipse (for Java 1.5 you should be using Eclipse 3.1 or greater), then select the Window->Preferences..." menu item. In the preferences dialog navigate to "Java->Installed JREs". Check that the 1.5 JVM is listed. If it is not listed, click on the "Add" button. Set the "JRE type" as "MacOS X VM", "JRE Name" as "JVM 1.5.0" "JRE home directory" as "/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home", "Default VM arguments" as "", and select "Use default system libraries". After you have added the 1.5 JVM, select it as the default JVM in the "Installed JREs preference dialog.

Now you should be all set. You may need to recreate your projects for the updated setting to be used in the projects.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.