I am fairly new to eclipse and have been struggling with this problem for
a
little while now.
I have successfully compiled an open source java program using Eclipse
Europa 3.3.1.1 on my Vista box. I have JRE and JDK 1.6.0_02. The README
from the project states:
"working JRE or JDK, version 1.2.2 or greater. A JDK/JRE version 1.3 or
greater is recommended."
I have set the Compiler Compliance level to 5.0 and verified the project
now
shows that the JRE System Library [JSE1-1.5] is loaded. However, when I
attempt to run the jar file on an OSX box with JRE 1.5.0_07 I receive the
following error:
'Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad
version number in .class file'
All my research reveals the obvious, the error indicates that I am
attempting
to run class files which were compiled on a a newer version of java on a
system with an older version of java. This is the case as I have just
explained, but I thought that setting the Compiler Compliance would cause
the
class files to be written to that version (as well as ensure I only use
functionality in that version)?
Is there any way to make this work in eclipse without actually downgrading
my
Java to 1.5?