I'm trying to get iCommand working now for severall weeks. I did install 
iCommand severall times through with the use of the enclosed readme.txt. 
Also I tried the installing with help of de pdf: 
http://www.juanantonio.info/p_research/robotics/p_lejos/docs/icommand0.5.pdf

I use Eclipse Version: 3.2.1 under Windows XP.

I wrote a simple test program (see below) to test the communication between 
NXT and my PC.
I can't get it working. I inserted debug println information in my program 
to see where it goes wrong. This is the errror I keep gettting:
1. Start
2. Before aanspreken NXT
24216257
3. After aanspreken NXT
Looking for 'icommand.properties' in working dir: D:\Projecten\ArmTik
NXTCOMM = COM6
Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version   = RXTX-2.1-7
gnu.io.PortInUseException: Unknown Application
Error while connecting NXTCommand() constructor
Error in aanspreken NXT object: null [Ljava.lang.StackTraceElement;@30c221
5. Before close in exception
        at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354)
        at icommand.nxtcomm.NXTComm.open(Unknown Source)
        at icommand.nxtcomm.NXTCommand.<clinit>(Unknown Source)
        at icommand.platform.nxt.NXT.getBrickName(Unknown Source)
        at ArmTik.ArmTik.main(ArmTik.java:19)
java.lang.NullPointerException
        at icommand.nxtcomm.NXTComm.close(Unknown Source)
        at icommand.nxtcomm.NXTCommand.close(Unknown Source)
        at ArmTik.ArmTik.main(ArmTik.java:26)
Exception in thread "main"

The error is on getBrickName()

Is there somebody how know's what I am doing wrong? Thanks for any help.

Greatings

Soj Amarag

------------------- My test program. 
--------------------------------------------
package ArmTik;
import icommand.platform.nxt.*;
import icommand.nxtcomm.*;

public class ArmTik {

        /**
         * @param args
         */
        public static void main(String[] args) {
                // TODO Auto-generated method stub
                System.out.println("1. Start");
                String sName = "";
                try {
                        System.out.println("2. Before aanspreken NXT");
                        NXT oNxt = new NXT();
                        System.out.println(oNxt.hashCode());
                        System.out.println("3. After aanspreken NXT");
                        sName = oNxt.getBrickName();
                        System.out.println("4. After getBrickName");

                } catch (Exception e) {
                        System.out.println("Error in aanspreken NXT object: " + 
e.getMessage() + 
" "
                                        + e.getStackTrace());
                        System.out.println("5. Before close in exception");
                        NXTCommand.close();
                        System.out.println("6. After close in exception");
                }
                System.out.println(sName);
                System.out.println("7. Before close");
                NXTCommand.close();
                System.out.println("8. After close");
        }

}

_________________________________________________________________
Bekijk je berichten in 1 oogopslag met de indeling van Live Mail! 
http://imagine-windowslive.com/mail/launch/default.aspx?Locale=nl-nl


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Lejos-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lejos-discussion

Reply via email to