"icommand.platform.nxt does not exist"

This is where you talk about the NXJ software itself, installation issues, and programming talk.

Moderators: 99jonathan, roger, imaqine

"icommand.platform.nxt does not exist"

Postby port3f8 » Sun Aug 19, 2007 10:35 pm

I am having a terrible time trying to get any icommand code to compile. I have renamed out-of-date code from the book from things like:
import icommand.nxt.comm.NXTCommand to remove the period between nxt.comm, but even though eclipse recognizes the import names, it will not find them at compile time.

Any thoughts appreciated.
________
Crown Victoria Skyliner
Last edited by port3f8 on Mon Feb 14, 2011 2:32 am, edited 1 time in total.
port3f8
New User
 
Posts: 5
Joined: Fri Jul 27, 2007 5:55 pm
Location: Los Gatos, CA

Postby bbagnall » Mon Aug 20, 2007 5:39 pm

It will only work with iCommand 0.6, which is due to be released soon (there's a preview available in the sticky thread).

You should also download the latest code from the book website at www.variantpress.com.
User avatar
bbagnall
Site Admin
 
Posts: 392
Joined: Fri Aug 04, 2006 4:03 pm

Postby port3f8 » Tue Aug 21, 2007 5:36 am

Thank you for your input Brian. Unfortunately it did not resolve the issue.


At compile I get all sorts of errors not finding icommand. Even though the code itself clearly is error free (no red lines - all commands recognised).

See below:

MoonBuggy.java:1: package icommand.nxt does not exist
import icommand.nxt.*;
^
MoonBuggy.java:2: package icommand.nxt.comm does not exist
import icommand.nxt.comm.NXTCommand;
^
MoonBuggy.java:3: package java.awt.event does not exist
import java.awt.event.*;
^
MoonBuggy.java:4: package java.awt does not exist
import java.awt.*;
^
MoonBuggy.java:11: cannot resolve symbol
symbol : class Frame
location: class MoonBuggy
public class MoonBuggy extends Frame implements KeyListener{
^
MoonBuggy.java:11: cannot resolve symbol
symbol : class KeyListener
location: class MoonBuggy
public class MoonBuggy extends Frame implements KeyListener{
^
MoonBuggy.java:28: cannot resolve symbol
symbol : class KeyEvent
location: class MoonBuggy
public void keyPressed(KeyEvent e) {
^
MoonBuggy.java:45: cannot resolve symbol
symbol : class KeyEvent
location: class MoonBuggy
public void keyReleased(KeyEvent e) {
^
MoonBuggy.java:62: cannot resolve symbol
symbol : class KeyEvent
location: class MoonBuggy
public void keyTyped(KeyEvent e) {}
^
MoonBuggy.java:20: cannot resolve symbol
symbol : variable NXTCommand
location: class MoonBuggy
NXTCommand.open();
^
MoonBuggy.java:21: package Motor does not exist
Motor.B.setSpeed(900); // Steering
^
MoonBuggy.java:22: package Motor does not exist
Motor.C.setSpeed(900); // Drive motor
^
MoonBuggy.java:23: cannot resolve symbol
symbol : method setBounds (int,int,int,int)
location: class MoonBuggy
this.setBounds(0, 0, 300, 50);
^
MoonBuggy.java:24: cannot resolve symbol
symbol : method addKeyListener (MoonBuggy)
location: class MoonBuggy
this.addKeyListener(this);
^
MoonBuggy.java:25: cannot resolve symbol
symbol : method setVisible (boolean)
location: class MoonBuggy
this.setVisible(true);
^
MoonBuggy.java:31: package Motor does not exist
Motor.C.backward();
^
MoonBuggy.java:34: package Motor does not exist
Motor.C.forward();
^
MoonBuggy.java:37: package Motor does not exist
Motor.B.forward();
^
MoonBuggy.java:40: package Motor does not exist
Motor.B.backward();
^
MoonBuggy.java:49: package Motor does not exist
Motor.C.flt();
^
MoonBuggy.java:53: package Motor does not exist
Motor.B.stop();
^
MoonBuggy.java:54: package Motor does not exist
System.out.println("Tacho: " + Motor.B.getTachoCount());
^
MoonBuggy.java:54: cannot resolve symbol
symbol : variable out
location: class java.lang.System
System.out.println("Tacho: " + Motor.B.getTachoCount());
^
MoonBuggy.java:57: cannot resolve symbol
symbol : variable NXTCommand
location: class MoonBuggy
NXTCommand.close();
^
24 errors
________
SIXTEEN
Last edited by port3f8 on Mon Feb 14, 2011 2:32 am, edited 1 time in total.
port3f8
New User
 
Posts: 5
Joined: Fri Jul 27, 2007 5:55 pm
Location: Los Gatos, CA

Postby bbagnall » Tue Aug 21, 2007 9:46 pm

You have to add icommand.jar to your classpath, as per the instructions.
User avatar
bbagnall
Site Admin
 
Posts: 392
Joined: Fri Aug 04, 2006 4:03 pm

Postby port3f8 » Fri Aug 24, 2007 2:58 pm

I am assuming adding a a file to my classpath is done as follows:

project>properties>
select "java build path"
click on "libraries tab"
click on "add external jars"
then browse through directories to get to "icommand.jar", and select it and add.

I have all this set and eclipse recognizes the calls to icommand.jar within moonbuggy.java

It seems that "NXJ Compile", which executes the file nxjc.bat, does not find icommand.jar.

I just don't know why. I have spent almost 2 weeks trying to figure this out, and am now ready to give up, simply because I have tried everything I can think of and I have no more ideas left.

Any clues greatly appreciated.

-Jonathan.
________
HAWAII MEDICAL MARIJUANA DISPENSARY
Last edited by port3f8 on Mon Feb 14, 2011 2:32 am, edited 1 time in total.
port3f8
New User
 
Posts: 5
Joined: Fri Jul 27, 2007 5:55 pm
Location: Los Gatos, CA

Postby bbagnall » Sun Aug 26, 2007 5:48 pm

I can tell right from error 1 that Java does not see icommand.jar:

MoonBuggy.java:1: package icommand.nxt does not exist
import icommand.nxt.*;

For some reason, it just doesn't see this package. Yet you say that you have icommand.jar in your classpath for the project. So something is wrong with the way you are telling it the location.

Maybe you could copy/paste what you have for the classpath, and also let me know where you installed iCommand. I dunno, maybe there is a typo or a space is screwing things up.
User avatar
bbagnall
Site Admin
 
Posts: 392
Joined: Fri Aug 04, 2006 4:03 pm


Return to NXJ Software

Who is online

Users browsing this forum: Baidu [Spider], Yahoo [Bot] and 4 guests

cron
more stuff