I'm new to leJOS community. Installed last version 0.9.1 in Windows 7, 32 bits, I've been able to run both samples and pcsamples, from USB and BT in my NXT (with last firmware 1.3) and last Phantom driver from Lego Mindstorms.
First of all, fantastic work you've done!! I'm trully impressed with what I've found.
Now, my question. I've done a Java Project where I connect to the NXT through NXTConnector and NXTCommandConnector.getSingletonOpen() and I can use all the sensors and the motors.
But when I wrap this project in a Glassfish server and run it, it turns that I can only get system values like getBatteryLevel() by adding jfantom.dll to c:\Windows\System32, and when I try to read sensor values, just by setting the SensorPort number I get an exception:
- Code: Select all
UltrasonicSensor distanceSensor = new UltrasonicSensor(SensorPort.S3);
java.lang.UnsatisfiedLinkError: lejos.nxt.SensorPort.setPowerTypeById(II)V
at lejos.nxt.SensorPort.setPowerTypeById(Native Method)
at lejos.nxt.SensorPort.setPowerType(SensorPort.java:1063)
at lejos.nxt.SensorPort.setType(SensorPort.java:973)
at lejos.nxt.SensorPort.reset(SensorPort.java:822)
at lejos.nxt.SensorPort.<init>(SensorPort.java:804)
at lejos.nxt.SensorPort.<clinit>(SensorPort.java:39)
or if I try to access to the motors I get a similar one:
- Code: Select all
DifferentialPilot pilot = new DifferentialPilot(wheelDiameter, wheelDistance, leftMotor, rightMotor);
java.lang.UnsatisfiedLinkError: lejos.nxt.Battery.getBatteryStatus()I
at lejos.nxt.Battery.getBatteryStatus(Native Method)
at lejos.nxt.Battery.getVoltageMilliVolt(Battery.java:34)
at lejos.nxt.Battery.getVoltage(Battery.java:49)
at lejos.nxt.NXTRegulatedMotor.getMaxSpeed(NXTRegulatedMotor.java:805)
at lejos.robotics.navigation.DifferentialPilot.getMaxTravelSpeed(DifferentialPilot.java:273)
at lejos.robotics.navigation.DifferentialPilot.<init>(DifferentialPilot.java:164)
at lejos.robotics.navigation.DifferentialPilot.<init>(DifferentialPilot.java:109)
at lejos.robotics.navigation.DifferentialPilot.<init>(DifferentialPilot.java:84)
So I think I've also to load the native library:
- Code: Select all
System.loadLibrary("jfantom");
and put it in the glassfish lib folder, but nothing of this has worked out.
I've even checked the dll with Dependency Walker, and I'm only missing Nispylog.dll.
What am I doing wrong?? Can you help me??
Thank you in advance!
Jose

