Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Java Compiler Compliance Level not working
Java Compiler Compliance Level not working [message #1295969] Mon, 14 April 2014 18:27 Go to next message
Michael Kraft is currently offline Michael KraftFriend
Messages: 1
Registered: April 2014
Junior Member
I'm working on a project that requires Java 1.5 compliance. Yes I know that's old, but that's what is being used. There are no project specific settings, so the main setting should be used.

I set the compiler compliance level to 1.5, yet I was able to use the String:isEmpty() function in code without the Eclipse compiler complaining at all. This resulted in an application that is not runnable using Java 1.5 as the String::isEmpty() function was added in Java 6.

Shouldn't the Compiler Compliance Level setting notify users if a function is being used that isn't compatible with the version set?

Re: Java Compiler Compliance Level not working [message #1296167 is a reply to message #1295969] Mon, 14 April 2014 21:35 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
No - the compilance level only influences the byte-code format. If 1.5
is your target then you better have 1.5 installed and configured in your
IDE as a JRE.

Tom

On 14.04.14 21:57, Michael Kraft wrote:
> I'm working on a project that requires Java 1.5 compliance. Yes I know
> that's old, but that's what is being used. There are no project
> specific settings, so the main setting should be used.
>
> I set the compiler compliance level to 1.5, yet I was able to use the
> String:isEmpty() function in code without the Eclipse compiler
> complaining at all. This resulted in an application that is not
> runnable using Java 1.5 as the String::isEmpty() function was added in
> Java 6.
>
> Shouldn't the Compiler Compliance Level setting notify users if a
> function is being used that isn't compatible with the version set?
>
>
Previous Topic:Not a valid line number?
Next Topic:My development environment has rotten
Goto Forum:
  


Current Time: Sat May 25 09:25:08 GMT 2024

Powered by FUDForum. Page generated in 0.02621 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top