# Java 1.5 + Eclipse 3.1



## HateEternal (Jul 2, 2005)

A new version of Eclipse is out and it is supposed to run natively on Java 1.5 which i have on my iBook. I haven't been able to get it to run on 1.5 it always goes to 1.4. I have used the Java Preferences.app to set my priority to Java 1.5 instead of 1.4 but it still launches in 1.4. I looked through the Info.plist and eclipse.ini but didn't see any settings to change. Any idea's? It still says 1.4 is my default in eclipse.


----------



## HateEternal (Jul 2, 2005)

Well perhaps not, I noticed in the documentation it was built for java 1.4. I guess the new support is just for development.


----------



## Viro (Jul 2, 2005)

I'm using Eclipse 3.1 with Java 1.5. Did you set all applications to use Java 1.5 by default? You need to go to the Java Preferences app (Utilities->Java->Java 5.0->Java Preferences) and set Java 1.5 to be the default.


----------



## HateEternal (Jul 2, 2005)

Are you sure it is running on 1.5? I did change my settings to have 1.5 as default through Java Preferences, and in eclipse i set my default compiler and jre as 5.0, but all that really has to do with is the programs that you are coding, not what eclipse runs on.

If you go to Eclipse > About Eclipse Platform and click the configuration details somewhere in the listing it should tell you what runtime environment it is running on.

For example mine says this:

```
Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext
java.home=/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home
java.io.tmpdir=/tmp
java.library.path=.:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition
java.runtime.version=1.4.2_07-215
```


----------



## Viro (Jul 2, 2005)

This is what mine says:

```
java.ext.dirs=/Library/Java/Extensions:/System/Library/Java/Extensions:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/lib/ext
java.home=/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home
java.io.tmpdir=/tmp
java.library.path=.:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition
java.runtime.version=1.5.0_02-56
```

I am indeed using Java 1.5.0


----------



## HateEternal (Jul 2, 2005)

WTF? See screen shots for settings, is there another place to change the default. If I am in the Java section of eclipse it says that 1.4.2 is the Mac OS X default compiler and JRE.

Did the 1.5 installer maybe ask if you wanted to use it as the default and I maybe selected no?


----------



## HateEternal (Jul 2, 2005)

There we go. I just added a line to Info.plist that specified what VM i wanted to run on.

Didn't seem to make much of a difference though... I was just curious.


----------



## Viro (Jul 2, 2005)

Did you set /System/Library/Frameworks/JavaVM.framework/Versions/Current to point to /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0 ?

You need to remove the what the Current links to and create a soft link to 1.5.0. To do that:

1) Go into terminal and type "cd /System/Library/Frameworks/JavaVM.framework/Versions"
2) sudo rm -f Current
3) sudo ln -sf 1.5.0 Current

That should do it.


----------

