Collection class in leJOS HELP

Post your NXJ projects, project ideas, etc here!

Moderators: roger, imaqine, 99jonathan

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

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

skoehler
leJOS Team Member
Posts: 1533
Joined: Thu Oct 30, 2008 4:54 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

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

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

Eclipse

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

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

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

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.

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

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

Thanks. After removing the JRE System libraries it works now.


Return to “NXJ Projects”

Who is online

Users browsing this forum: No registered users and 1 guest