I have a try-catch statement in a Java servlet class. Netbeans shows an error on this:
try-with-resources is not supported in -source 1.6 (use -source 7 or higher to enable try-with-resources)
How can I get rid of this error?
It looks like you found my thread from the NetBeans forums, in which I posted the solution:
I got the error to go away.
Right click on project > Properties > Sources > Source/Binary Format: JDK 7 > OK.
Source:
Error: "try-with-resources is not supported in -source 6 (use -source 7 or higher to enable try-with-resources)":
http://forums.netbeans.org/ntopic42154.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With