In the Package Explorer, which JRE is referenced for your project? If that is still 1.6, you can change it in the Project Properties under Java Build Path, the Libraries tab. Of course, you would then need a 1.4.2 JDK installed.
Originally posted by Peter Johnson: .. Of course, you would then need a 1.4.2 JDK installed.
Yes it is still pointing to 1.6. I was under the impression, that the "compliance level" stuff would internally work out the "-source" and "-target" flags and build accordingly. If I need to install multiple version, it defeats the purpose of having the "compliance level" functionality
Originally posted by Maneesh Godbole: I was under the impression, that the "compliance level" stuff would internally work out the "-source" and "-target" flags and build accordingly.
That's exactly what it does. But those settings (in Eclipse as well as on the command line with javac) only check that you're not using language features that were added in Java 5 or 6. You still have to make sure it looks at the right version of the JVM libraries. If you want to develop for 1.4, you'll need to install 1.4 and make Eclipse use it for your project.
By setting the compliance level to 1.4.2, I think that Eclipse will tag annotations (and other new 1.5 and 1.5 Java language features) as errors, but as Jesper pointed out as long as you are using the 1.6 JDK library, Eclipse will not mark classes or methods introduced in 1.5 or 1.6 as errors.