0073 javacTask: 源发行版 1.8 需要目标发行版 1.8
今天在编译执行下面这段代码的时候,编译报错:javacTask: 源发行版 1.8 需要目标发行版 1.8
public class Test {
public static void main(String[] args) {
String b="b";
switch(b){
case "a":
System.out.println("A");
break;
case "b":
System.out.println("B");
break;
case "c":
System.out.println("C");
break;
}
}
}
参考:http://www.cnblogs.com/cxj20160928/p/5954336.html
- File-->Project Structure-->Project-->Project SDK 和 Project Language Level
- File-->Project Structure-->Modules-->Source-->Language Level
- File-->Settings-->Build, Execution, Deployment-->Compiler-->java compiler-->Project bytecode version 和Per_module bytecode version的Target bytecode version