java: strings in switch are not supported in -source 1.6
(use -source 7 or higher to enable strings in switch)
解法
- Preferences > Compiler > Java Compiler and added
-source 7
and/or-target 1.7
toAdditional command line parameters - Edit Configurations: checked Use Alternative JDK and wrote in the directory
/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home