Home » Language IDEs » Java Development Tools (JDT) » Eclipse forgets compiler compliance level
Eclipse forgets compiler compliance level [message #1281176] |
Mon, 31 March 2014 09:21  |
Eclipse User |
|
|
|
When initially setting up Eclipse, I set the Compiler compliance level to 1.6 in Window - Preferences - Java - Compiler.
For each project I create, I do NOT enable project specific settings in Project - Properties - Java Compiler. It shows up as 1.6.
Periodically, about twice a week, my WORKING project shows hundreds of errors. Errors that were not there before.
To correct the situation, I go into Project - Properties - Java Compiler, enable project specific settings, change the compliance level to 1.4, click apply, and click yes to the message about rebuilding the project. This, obviously, results in lots of errors.
I then change the level to 1.5, click apply, and click yes to the message about rebuilding the project. This results in significantly fewer errors.
Finally, I change the level to 1.6, apply, and rebuild. This results on NO errors, and everything is good again.
What have I missed? Why is Eclipse doing this to me?
Thank you in advance.
Steve
|
|
|
Re: Eclipse forgets compiler compliance level [message #1281598 is a reply to message #1281176] |
Tue, 01 April 2014 00:36  |
Eclipse User |
|
|
|
Steve,
I've never seen that. When this happens, what are the global setting
JDT Compiler preferences set to and what's in the .classpath file of
each project? It sounds as if the global preference is changing, though
I know of nothing that would do that automatically. It's generally
better, in my opinion, for each project to specify locally (project
specifically, in its .classpath file) what Java compliance it should have...
On 31/03/2014 3:21 PM, Steve Glasgow wrote:
> When initially setting up Eclipse, I set the Compiler compliance level
> to 1.6 in Window - Preferences - Java - Compiler.
>
> For each project I create, I do NOT enable project specific settings
> in Project - Properties - Java Compiler. It shows up as 1.6.
>
> Periodically, about twice a week, my WORKING project shows hundreds of
> errors. Errors that were not there before.
>
> To correct the situation, I go into Project - Properties - Java
> Compiler, enable project specific settings, change the compliance
> level to 1.4, click apply, and click yes to the message about
> rebuilding the project. This, obviously, results in lots of errors.
>
> I then change the level to 1.5, click apply, and click yes to the
> message about rebuilding the project. This results in significantly
> fewer errors.
>
> Finally, I change the level to 1.6, apply, and rebuild. This results
> on NO errors, and everything is good again.
>
> What have I missed? Why is Eclipse doing this to me?
>
> Thank you in advance.
> Steve
>
|
|
|
Goto Forum:
Current Time: Fri Apr 25 09:40:46 EDT 2025
Powered by FUDForum. Page generated in 0.03116 seconds
|