2013年10月11日星期五

IntelliJ IDEA12.1.6 using JDK1.7 Switch statement with string error

JDK1.7 new features, migrating code from the Eclipse , and Eclipse with the same JDK1.7.0_07, in Eclipse switch () writes the string in parentheses normal operation .

IDEA to display the following error:




compiler version 1.7 also selected , the results compiled Times java:-source 1.6 does not support the switch exists in string
( use -source 7 or higher to allow the switch exists in the string )

ask where else you want to set it ?
------ Solution ---------------------------------------- ----
if your project still using 1.6 . IntelliJ environment variables do not need to change it ?
------ For reference only -------------------------------------- -
problem solved Project language level is changed to 7.0 or 6.0 are not being given a

没有评论:

发表评论