Two Laptop Bag*
The moose likes IDEs, Version Control and other tools and the fly likes Compiler Compliance Level vs Build JRE Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Compiler Compliance Level vs Build JRE" Watch "Compiler Compliance Level vs Build JRE" New topic

Compiler Compliance Level vs Build JRE

Harry Jonathan

Joined: Aug 17, 2011
Posts: 2
I am working on a eclipse project for which default build project library is 1.5 but compliance level is 1.4.

From above configuration what I understood is that the project will be build with 1.4 compatibility and build the same way as that of JDK 1.4 library.

In my program I am using java.util.concurrent.CopyOnWriteArraySet which was introduced in jdk 1.5. When I compile my code with above setting it gets compiled properly.
But when I point my default workspace library to 1.4 with compliance level as 1.4 it shows error for the same.

What is the difference between setting the build library JRE and compiler compliance

Please reply ...
Peter Johnson

Joined: May 14, 2008
Posts: 5812

Harry, welcome to Java Ranch!

I just knew that I recalled seeing this discussed earlier, and sure enough searching for "compiler compliance level" in this forum yielded this:

JBoss In Action
It is sorta covered in the JavaRanch Style Guide.
subject: Compiler Compliance Level vs Build JRE
Similar Threads
Absent Line Number Information - I'm NOT using Ant
WSAD 5.1.2 and J2SE 1.5 Compiler
Difference between 'Installed JREs' and 'Compiler Compliance Level' in Eclipse
Eclipse Compiler Compliance
Java or Netbeans error?