Compose*/Java in Eclipse with JRE 1.5
First of all, it is strongly advised to use Java Runtime Environment 6 or later. However, there is a case where Eclipse does not work with JRE6. In this case you can fallback to running Eclipse in JRE5.
But to make Compose*/Java work properly you need to take some additional steps. JDK6 is only optional when Eclipse is running in JRE6. This is because in that case Compose*/Java can use the Eclipse JDT Java compiler. This compiler is not available when Eclipse is run in JRE5.
When Compose*/Java can not use the Eclipse JDT compiler it needs the "javac" from JDK6 (the compiler option
-implicit:none is required).
The best approach is to register a Java-SE 6 execution environment in Eclipse (Preferences > Java > Installed JREs). If you set the JDK6 as preferred JRE then everything should work without any additional changes. You might need to add the
tools.jar library to the list of system libraries.
If you do not register a Java-SE 6 execution environment, or do not have the JDK6 as preferred JRE you will need to make sure that executing
javac on the commandline calls the JDK6
javac. You can verify this by typing
Lastly, if no Java-SE 6 execution environment is registered in Eclipse it will fall back to JRE5. In that case you will have to make sure your project is compiled using Java 1.5 compatibility (Project Properties > Java Compiler > compliance level). Otherwise the JDK6
javac will create Java-SE 6 class files, which can not be used by Compose*/Java when it is running from a JRE6.