I am attempting to use JDK 7's "try-catch with resources" statement; IntelliJ highlights my resource line, saying
Try-with-resources are not supported at this language level.
When I try to compile, I get:
java: try-with-resources is not supported in -source 1.6
(use -source 7 or higher to enable try-with-resources)
I checked that try-with-resources is enabled for my current project, and that my project is using JDK 7 (Library: C:Program FilesJavajdk1.7.0_11). Any ideas? I can't figure out what option to change (if that's even the issue).
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…