Problem with jdk 1.7 exclusive codes in netbeans
I'm copying some codes with "try-with-resources" and "diamond operators" from my previous project to my current project in netbeans. The problem is whenever I type that patterns, there will be error coming up which says:
diamond operator/try-with-resources is not supported in -source 1.6
(use -source 7 or higher to enable diamond operator)
I'm very sure that my JDK version is 1.7 because from my previous project it had no errors.
Please help. Thanks in advance. :)
NOTE 1: I checked the Library of my current project and netbeans.conf.
NOTE 2: The JDK 1.7 folder that I used in my previous project were the one's that I used in my current project.
Re: Problem with jdk 1.7 exclusive codes in netbeans
Project Properties -> Sources : Source/Binary format. If 1.7 isn't available, you have to first add the Java platform under Tools -> Java Platforms.
And for your future reference, go through the Forum Rules -- particularly the second paragraph.
db
Re: Problem with jdk 1.7 exclusive codes in netbeans
Could you post the old code and the new one you are trying to make?
Re: Problem with jdk 1.7 exclusive codes in netbeans
Quote:
Originally Posted by
End Of All
Could you post the old code and the new one you are trying to make?
Whatever for? It's not relevant to the question asked.
db
Re: Problem with jdk 1.7 exclusive codes in netbeans
I just want to see if my idea is correct
Re: Problem with jdk 1.7 exclusive codes in netbeans
Don't hijack another poster's thread for some unrelated purpose.
Also, don't misuse the private messaging feature. I've deleted your message without going through it.
Technical questions belong on the forum. Start a new thread for your question -- they're free.
db