Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: Eclipse - Everything suddenly broken due to compliance level

  1. #1
    Forum VIP
    Join Date
    Jul 2010
    Posts
    1,676
    Thanks
    25
    Thanked 329 Times in 305 Posts

    Default Eclipse - Everything suddenly broken due to compliance level

    Ok, so something weird has happened, and I'm not sure how to fix it. I am using Eclipse.
    All of my projects would appear to think that it is using some JDK compliance level below 1.5. They were working yesterday. I started up Eclipse today, and everything is suddenly broken.

    Under Preferences > Java > Compiler, I have the JDK Compliance Level set to: 1.7
    Under Preferences > Java > Installed JREs, I have jdk1.7.0_45 checked as default and as the only installed JRE
    Furthermore, the projects have the jdk1.7.0_45 as the defined JRE System Library in their Java Build Path. And the projects are not enabled with project specific settings.

    I am getting errors for annotations, enum keywords, ect., all telling me I need to change the project or workspace compliance and JRE to 1.5 or greater. As far as I can tell, they already are...

    Any thoughts?
    NOTE TO NEW PEOPLE LOOKING FOR HELP ON FORUM:

    When asking for help, please follow these guidelines to receive better and more prompt help:
    1. Put your code in Java Tags. To do this, put [highlight=java] before your code and [/highlight] after your code.
    2. Give full details of errors and provide us with as much information about the situation as possible.
    3. Give us an example of what the output should look like when done correctly.

    Join the Airline Management Simulation Game to manage your own airline against other users in a virtual recreation of the United States Airline Industry. For more details, visit: http://airlinegame.orgfree.com/


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,517
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: Eclipse - Everything suddenly broken due to compliance level

    Open a console window and type 'javac -version' to ensure the system is still set up right.

    Anything else change since you were working last? System updates? Anything you can think of? What OS are you using?

  3. #3
    Forum VIP
    Join Date
    Jul 2010
    Posts
    1,676
    Thanks
    25
    Thanked 329 Times in 305 Posts

    Default Re: Eclipse - Everything suddenly broken due to compliance level

    Windows 7. I've done system updates and I've cleared my system's temp folder.

    I think I may have sorted it out, but I'm not happy with the solution. I pressed the: "change project to 1.5 compliance" or whatever popup on an error message for one of my projects. That set the JRE to 1.5 and turned on the "enable with project specific settings" checkbox in the project's compiler settings. I then manually set the JRE back to 1.7 and unchecked the "enable with project specific settings" and it is all fine again for every project...

    The best I can guess is that Eclipse "forgot" what it was set to, and would only accept my manual changes if it first did its automatic change for some stupid reason. Who knows...Eclipse works in mysterious ways sometimes.
    NOTE TO NEW PEOPLE LOOKING FOR HELP ON FORUM:

    When asking for help, please follow these guidelines to receive better and more prompt help:
    1. Put your code in Java Tags. To do this, put [highlight=java] before your code and [/highlight] after your code.
    2. Give full details of errors and provide us with as much information about the situation as possible.
    3. Give us an example of what the output should look like when done correctly.

    Join the Airline Management Simulation Game to manage your own airline against other users in a virtual recreation of the United States Airline Industry. For more details, visit: http://airlinegame.orgfree.com/

Similar Threads

  1. Replies: 3
    Last Post: August 3rd, 2012, 10:40 AM
  2. send image file from java to php broken pipe exception occured
    By ashi123 in forum What's Wrong With My Code?
    Replies: 2
    Last Post: July 21st, 2011, 02:53 PM
  3. Broken JPanel?
    By psu in forum What's Wrong With My Code?
    Replies: 6
    Last Post: March 22nd, 2011, 11:11 AM
  4. How to set java compiler compliance with command under Linux
    By Eric97 in forum Java Theory & Questions
    Replies: 2
    Last Post: November 9th, 2010, 09:25 AM