Collection class in leJOS HELP

Post your NXJ projects, project ideas, etc here!

Moderators: 99jonathan, roger, imaqine

Collection class in leJOS HELP

Postby win1for » Fri Jul 16, 2010 2:19 pm

Hi Guys,

I am trying to use LinkedList in leJOS but anytime i try to upload, i get an error that says:


421: cannot find symbol
symbol : class LinkedList
location: class receiver.NXTReceiver
LinkedList<Node> queue = new LinkedList<Node>();

What collection class should i use?


thanks
win1for
Novice
 
Posts: 48
Joined: Tue Mar 02, 2010 11:22 pm

Re: Collection class in leJOS HELP

Postby skoehler » Fri Jul 16, 2010 2:27 pm

win1for wrote:Hi Guys,
I am trying to use LinkedList in leJOS but anytime i try to upload, i get an error that says:


Which IDE are you using?

win1for wrote:421: cannot find symbol
symbol : class LinkedList
location: class receiver.NXTReceiver
LinkedList<Node> queue = new LinkedList<Node>();

What collection class should i use?


ArrayList
skoehler
leJOS Team Member
 
Posts: 1448
Joined: Thu Oct 30, 2008 4:54 pm

Postby win1for » Fri Jul 16, 2010 2:40 pm

Eclipse
win1for
Novice
 
Posts: 48
Joined: Tue Mar 02, 2010 11:22 pm

Postby tlaukkan » Fri Jul 16, 2010 3:06 pm

Try removing all the the standard java jars from eclipse project classpath so you can only use those classes what are really available in NXJ.

-tommi
tlaukkan
New User
 
Posts: 11
Joined: Wed Jul 14, 2010 5:45 am

Postby skoehler » Fri Jul 16, 2010 3:18 pm

tlaukkan wrote:Try removing all the the standard java jars from eclipse project classpath so you can only use those classes what are really available in NXJ.


Exactly. Only the classes.jar must be part of your project configuration. Kick out any other JDK.
skoehler
leJOS Team Member
 
Posts: 1448
Joined: Thu Oct 30, 2008 4:54 pm

Postby win1for » Fri Jul 16, 2010 6:24 pm

Thanks. After removing the JRE System libraries it works now.
win1for
Novice
 
Posts: 48
Joined: Tue Mar 02, 2010 11:22 pm


Return to NXJ Projects

Who is online

Users browsing this forum: No registered users and 0 guests

more stuff