Problems getting 1.4.2 JRE recognized on OS X [message #535283] |
Fri, 21 May 2010 16:08  |
Eclipse User |
|
|
|
Hi all,
I'm running into a problem. I have installed the 1.4.2 JRE from Apple on my Mac, currently running Snow Leopard. I am currently running the latest standard download of Eclipse for Java EE Developers. Currently, Eclipse properly detects that there are two different JREs on the machine, and points to their proper location in the Preferences -> Java -> Installed JREs preference page. I can even set the 1.4.2 JRE to be the default workspace JRE.
However, when I create a new project, the JRE System Library container, while still called [JVM 1.4.2-leopard (MacOSX Default)], gets its jars from the Java 6 home. For instance, classes.jar is located at:
/System/LIbrary/Frameworks/JavaVM.framework/Versions/1.6.0/C lasses
This despite the fact that:
- The 1.4.2 JRE in the preferences page points to /System/LIbrary/Frameworks/JavaVM.framework/Versions/1.4.2-l eopard/Home
- There is a classes.jar file at /System/LIbrary/Frameworks/JavaVM.framework/Versions/1.4.2-l eopard/Classes
To make things even more bizarre, if I run an instance of Eclipse with the same configuration as the default instance from within eclipse (i.e. as a Run Configuration), the project points to the correct JVM.
And if you want more weird for your buck, importing the project back into the regular workspace from the test workspace results in an error because the JRE System Library is an unbound classpath container.
Does anyone know what could be causing this?
|
|
|
Re: Problems getting 1.4.2 JRE recognized on OS X [message #535312 is a reply to message #535283] |
Sat, 22 May 2010 01:48   |
Eclipse User |
|
|
|
"Alexandros Salazar" <alexandros.salazar@infor.com> wrote in message
news:ht6p8j$dk7$1@build.eclipse.org...
> Hi all,
>
> I'm running into a problem. I have installed the 1.4.2 JRE from Apple on
> my Mac, currently running Snow Leopard. I am currently running the latest
> standard download of Eclipse for Java EE Developers. Currently, Eclipse
> properly detects that there are two different JREs on the machine, and
> points to their proper location in the Preferences -> Java -> Installed
> JREs preference page. I can even set the 1.4.2 JRE to be the default
> workspace JRE.
>
> However, when I create a new project, the JRE System Library container,
> while still called [JVM 1.4.2-leopard (MacOSX Default)], gets its jars
> from the Java 6 home. For instance, classes.jar is located at:
>
> /System/LIbrary/Frameworks/JavaVM.framework/Versions/1.6.0/C lasses
>
> This despite the fact that:
>
> - The 1.4.2 JRE in the preferences page points to
> /System/LIbrary/Frameworks/JavaVM.framework/Versions/1.4.2-l eopard/Home
> - There is a classes.jar file at
> /System/LIbrary/Frameworks/JavaVM.framework/Versions/1.4.2-l
> eopard/Classes
>
> To make things even more bizarre, if I run an instance of Eclipse with the
> same configuration as the default instance from within eclipse (i.e. as a
> Run Configuration), the project points to the correct JVM.
>
> And if you want more weird for your buck, importing the project back into
> the regular workspace from the test workspace results in an error because
> the JRE System Library is an unbound classpath container.
>
> Does anyone know what could be causing this?
Does it help if you change the compiler compliance to 1.4? I wonder if
maybe it's defaulting to Java 6, and then figuring that it needs a 1.6 JRE
to run that with. Purely a guess.
|
|
|
Re: Problems getting 1.4.2 JRE recognized on OS X [message #535485 is a reply to message #535312] |
Sun, 23 May 2010 22:44  |
Eclipse User |
|
|
|
Thanks for the suggestion. While the 1.4 compliance level was already set, by clicking around the UI I realized that I was able to modify the jars pointed to by any JRE, including the 1.4. For reference:
* Go to Preferences -> Java -> Installed JREs
* Double-click on the JRE causing the problem (in my case, it was called 1.4.2-leopard)
* Remove all jars pointing to the incorrect folder (in my case, all jars pointing to a folder with 1.6.0 in the name)
* Replace with equivalent jars with the correct path (in my case, all jars pointing to a folder with 1.4.2-leopard in the name)
I don't know yet:
1. If the extensions will work (those in /System/Library/Java/Extensions and the like)
2. Why Eclipse isn't able to properly pick up the right classes.
Thanks for the help.
Alexandros
|
|
|
Powered by
FUDForum. Page generated in 0.02924 seconds