wood burning stoves 2.0*
The moose likes Java in General and the fly likes I'm getting a few errors... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "I Watch "I New topic
Author

I'm getting a few errors...

Darryl Neeley
Greenhorn

Joined: Mar 18, 2006
Posts: 6
And I'm just wondering what they mean that I need to do. Mainly just Two. I'll post the section of code that it's doing it on too. Thank you for the help. =P

<identifier> expected
ArrayList<JCheckBox> checkboxList;
---------^

AND

"(" or "[" expected
checkboxList = newArrayList<JCheckBox>();
---------------------------^
[ March 18, 2006: Message edited by: Darryl Neeley ]
Keith Lynn
Ranch Hand

Joined: Feb 07, 2005
Posts: 2367
I believe that you are trying to compile code written for JDK 1.5 with JDK 1.4. Generics were added in 1.5, and if you compile in 1.4 you will get those errors.
Darryl Neeley
Greenhorn

Joined: Mar 18, 2006
Posts: 6
Dammit...that means I need to install 1.5/5.0, doesn't it? =(
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

Yep; or don't use generics. But installing a new JDK is really not a difficult thing. The only thing to watch out for is that your current JDK may have installed a copy of java.exe someplace like C:\WINDOWS; the symptom would be that after installing and updating your path, you'd see an error about "Unsupported class file version 49." If you have this problem, find the extra java.exe and delete it.


[Jess in Action][AskingGoodQuestions]
 
jQuery in Action, 2nd edition
 
subject: I'm getting a few errors...
 
Similar Threads
Doubt in checkboxlist
checkboxlist alignment
Struts2 checkboxlist prepopulate problem
About checkboxList...
Using checkBoxlist in struts2