Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

HELP!! Major Java Malfunction

Options
  • 22-11-2012 7:23pm
    #1
    Registered Users Posts: 16


    Right, so, I'm not even sure exactly what I did.
    I was doing a simple switch statement but was using a string rather than a char which showed up an error, that's fine, i'm not bothered about that, but i STUPIDLY clicked on the quick fix (without even really reading it) and now all my code is coming up with error after error.
    it said something about 1.7 so i went

    window -> preferences -> Java -> compiler

    and compiler compliance level is set at 1.6 and default compliance settings are being used.

    anybody know what i did? or better yet how to undo it??

    p.s. i'm a total noob with java


Comments

  • Registered Users Posts: 1,731 ✭✭✭GreenWolfe


    Using the method you used to get to the dialog, set it back to its original value and try cleaning your project.

    Project --> Clean... --> Clean all projects --> OK

    I don't know if it'll work but give it a go.

    Java only got the ability to switch with Strings in Java 7, that's what the quick fix is about.


  • Registered Users Posts: 16 awney



    Java only got the ability to switch with Strings in Java 7, that's what the quick fix is about.

    no, didn't work :( and i thought that was the case, so when it says it's back at 1.6 i thought it would work okay again, this is very frustrating!


  • Registered Users Posts: 1,731 ✭✭✭GreenWolfe


    Is your Java build path OK?

    Right click your project --> Properties --> Java Build Path --> Libraries tab

    Does the entry there match the JRE/JDK you're using?


  • Registered Users Posts: 16 awney


    there's nothing at all in the libraries tab ...


  • Registered Users Posts: 1,731 ✭✭✭GreenWolfe


    awney wrote: »
    there's nothing at all in the libraries tab ...

    In that view, click Library, add JRE system Library, click Next, choose Workspace default JRE and click Finish. Your Java libraries should now be in your build path. Rebuild the project, and (hopefully) the errors should be gone.


  • Advertisement
  • Registered Users Posts: 16 awney


    excellent ... thank you so much all the errors are gone!!! :)


Advertisement