Eclipse with java 1.4

Steve Joynt steve.joynt at gmail.com
Tue Jan 23 02:48:16 UTC 2007


Hi,

I'm using eclipse 3.2.1, built from ports a couple of days
ago. In preferences, under installed JREs, I have:
/usr/local/diablo-jdk1.5.0
/usr/local/jdk1.4.2 (set as default)
/usr/local/linux-sun-jdk1.4.2

With this configuration, I can't get any ant builds to run with eclipse - I
get a console window that terminates immediately without any messages.
In the ant preferences I've tried changing ANT_HOME to
/usr/local/share/java/apache-ant, but that didn't help. I'm guessing
it has something to do with eclipse being compiled with java 1.5.

When I set the default jre to diablo-jdk1.5.0, the ant builds run ok.

Is it possible to compile or run eclipse with java 1.4? The port's makefile
overwrites JAVA_VERSION with 1.5+.

When I try to run eclipse using the jdk1.4.2 vm, it fails:
$ eclipse -vm /usr/local/jdk1.4.2/bin/java
Exception in thread "main" java.lang.UnsupportedClassVersionError:
org/eclipse/core/launcher/Main (Unsupported major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)

I'm pretty sure this means the classes were built with java 1.5 and can't be
run with 1.4. I also tried setting JAVA_VERSION to 1.4, but eclipse seemed
to ignore it.

Thanks for any suggestions,
Steve


More information about the freebsd-eclipse mailing list