Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

use -source 5 or higher to enable generics

843785Jan 28 2009 — edited Jan 29 2009
Hi
Hope you can help, am getting below error when trying to compile my code:
init:
deps-jar:
Created dir: C:\Documents and Settings\andy mckeown\Desktop\TMA02 Download\TMA02Q2\build\classes
Compiling 1 source file to C:\Documents and Settings\andy mckeown\Desktop\TMA02 Download\TMA02Q2\build\classes
C:\Documents and Settings\andy mckeown\Desktop\TMA02 Download\TMA02Q2\src\tma02q2\ButtonPanel.java:27: generics are not supported in -source 1.4
(use -source 5 or higher to enable generics)
    private ArrayList<Integer> simonSequence; // Simon's sequence of numbered buttons
C:\Documents and Settings\andy mckeown\Desktop\TMA02 Download\TMA02Q2\src\tma02q2\ButtonPanel.java:46: for-each loops are not supported in -source 1.4
(use -source 5 or higher to enable for-each loops)
        for (JButton b: buttons)
2 errors
BUILD FAILED (total time: 0 seconds)
I am using netbeans 1.4 and have installed java 1.6.0_11 and have added it to the class path so netbeans seems to be using it any ideas what is wrong?

Thanks
Andy
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 26 2009
Added on Jan 28 2009
2 comments
306 views