How to build java project with command-line arguments in IntelliJ -
i have java test project has 2 binary fields.when want compile project in intellij,it complains should utilize -source 7 instead of -source 1.6 while compiling.my jdk latest.i don't know how prepare this.
sample code:
public class bitwisetest { static int val1 = 0b01110;//compile-time error static int val2 = 0b11011;//compile-time error public static void main() { system.out.println(val1 & val2); } }
the issue happens due wrong configuration of project language level set. although may using java 7 since project language level configured incorrectly uses constructs valid in language level.thus error. prepare follow steps :
go file->project structure->project & alter project language level 7.0 & project sdk 1.7
java build compilation intellij-idea javac
No comments:
Post a Comment