Search code examples
javaeclipse

How to set Eclipse compiler level to 1.1


Hi I use Eclipse 3.4 Ganymade which uses JRE 1.4/1.5 alternatively. Now I have to use JDK1.1 for one of my application. As far as I know Eclipse uses JRE1.3 as the default level of compiler. Is there any way to work with JRE1.1. I had installed both JDK 1.1 and 1.4 as well.


Solution

  • AFAIK there weren't any language changes between 1.1 and 1.3, so all you have to do is set source compatibility to 1.3, "Generated .class file compatibility" to 1.1 and configure your project to use the 1.1 standard API JAR, and it should work.

    Correction: there was one language change introduced in Java 1.2: the strictfp keyword. However, since it is very rarely used, it's probably something you can safely ignore. Additionally, I don't think it would result in any incompatibilities, since it only causes the VM to selectively behave like pre-1.2 VMs always did.