0
try ( BufferedInputStream bis = new BufferedInputStream(
            new FileInputStream(f))) {}

I used jdk 1.8 and netbeans 8.0.2 .The edidor show the error:

try-with-resource not supported in -source1.5 (use 7 or higher to enable try-with-resources). I cant understand what it says.guide me.

peter
  • 43
  • 1
  • 7

1 Answers1

1

You need to set netbeans to treat your project as java 7 (or 8) project.

Look here: Netbeans documentation. Specially at: "Checking the Project Configuration" paragraph.