Results 1 to 6 of 6
  1. #1
    patrick793 is offline Member
    Join Date
    Jul 2012
    Posts
    1
    Rep Power
    0

    Default 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.

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is online now Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,422
    Rep Power
    20

    Default 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
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    End Of All is offline End Of All
    Join Date
    Jul 2012
    Location
    USA
    Posts
    17
    Rep Power
    0

    Default 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?

  4. #4
    DarrylBurke's Avatar
    DarrylBurke is online now Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,422
    Rep Power
    20

    Default Re: Problem with jdk 1.7 exclusive codes in netbeans

    Quote Originally Posted by End Of All View Post
    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
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  5. #5
    End Of All is offline End Of All
    Join Date
    Jul 2012
    Location
    USA
    Posts
    17
    Rep Power
    0

    Default Re: Problem with jdk 1.7 exclusive codes in netbeans

    I just want to see if my idea is correct

  6. #6
    DarrylBurke's Avatar
    DarrylBurke is online now Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,422
    Rep Power
    20

    Default 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
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. JTextArea in Full-Screen Exclusive Mode
    By Willi in forum AWT / Swing
    Replies: 7
    Last Post: 10-14-2009, 08:10 PM
  2. Replies: 4
    Last Post: 10-13-2009, 02:10 PM
  3. Problem with non ASCII codes
    By ajay.madamala in forum Advanced Java
    Replies: 0
    Last Post: 04-19-2009, 01:18 AM
  4. Replies: 0
    Last Post: 06-22-2008, 11:06 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •