Solved IntelliJ IDEA Compiling bug with Java 7 and switches

Discussion in 'Plugin Development' started by Gamecube762, Aug 24, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    Gamecube762

    So I decided to try out the IntelliJ IDE that everyone has been talking about recently. It works and looks good, but the main bug I've been having (that I don't get in Eclipse) is when I complile the code, it gives me an error saying: java: strings in switch are not supported in -source 1.6
    (use -source 7 or higher to enable strings in switch) (also in image below). I am using Java 7 (6 inst installed), you can see it is compiling with Java 7, but its compiling like its Java 6. This code compiles fine in Eclipse and works in-game. [​IMG]
    Anyone know how to fix this?
     
  2. Offline

    metalhedd

    File -> Project Structure, choose 'Project' under 'Project Settings' in the left side, and change the 'Language Level' to 7.0
     
    Gamecube762 likes this.
  3. Offline

    Gamecube762

    Thank you metalhedd, one of the few problems that Google couldn't answer xD
     
  4. Offline

    zorro1o1

    Google doesnt talk o.o
     
  5. Offline

    Gamecube762

    But it can give you answers!
    Forgot to mark this thread as [Solved] XD
     
Thread Status:
Not open for further replies.

Share This Page