Igor Kromin |   Consultant. Coder. Blogger. Tinkerer. Gamer.

| Views: 3752
Now that Java 8 has been released, you would think that the IDE that comes from the makers of Java would support all of the language syntax that dates back to the Java 7 days, but alas it does not. I tried both JDeveloper 11g ( and 12c ( and neither appear to support the try-with-resources syntax that was introduced as a part of JDK 7. However, compiling the code has no problems, both IDEs are able to compile source code that is using this new syntax.

Here's a screenshot of what happens in JDeveloper 12c when trying to use this syntax.

The try-with-resources is described at the Java Tutorial page here.

"Try statement: Expecting {." is the error, well it's not really a syntax error here, just lack of support from the IDE.

Edit: This does work in JDev 12c, but only AFTER you set the compiler source version to 1.7 AND restart JDeveloper. Just changing the source version has no immediate effect.


Have comments or feedback on what I wrote? Please share them below! Found this useful? Consider sending me a small tip.
comments powered by Disqus
Other posts you may like...