This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript 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
Author

Compiler Compliance Level vs Build JRE

Harry Jonathan
Greenhorn

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
author
Bartender

Joined: May 14, 2008
Posts: 5823
    
    7

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:
http://www.coderanch.com/t/531065/vc/Difference-between-Installed-JREs-Compiler


JBoss In Action
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Compiler Compliance Level vs Build JRE