Skip to main content



      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 14:27 Go to next message
Eclipse UserFriend
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 17:35 Go to previous message
Eclipse UserFriend
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: Thu Apr 24 04:16:31 EDT 2025

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

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

Back to the top