I am testing RCXPort, but I am having some probelms. I have a simple program which compiles and downloads fine to the RCX:
- Code: Select all
import josx.rcxcomm.*;
import java.io.*;
import josx.platform.rcx.*;
public class Receiver {
public static void main(String args[]){
try{
RCXPort port = new RCXPort();
InputStream is = port.getInputStream();
DataInputStream dis = new DataInputStream(is);
int i = dis.read();
LCD.showNumber(i);
Thread.sleep(4000);
}
catch(Exception e){}
}
}
This code compiles, downloads, and runs fine on the RCX.
I also have the "Sending" code for the PC.
- Code: Select all
import josx.rcxcomm.*;
import java.io.*;
public class Send {
public static void main(String [] args) {
try {
RCXPort port = new RCXPort();
OutputStream os = port.getOutputStream();
DataOutputStream dos = new DataOutputStream(os);
dos.write((int)1);
dos.flush();
}
catch (IOException ioe) {
}
}
}
This code also compiles as well, but when I run it I get this message.
C:\>java Send
Exception in thread "main" java.lang.UnsatisfiedLinkError: josx.rcxcomm.LLC.init
()V
at josx.rcxcomm.LLC.init(Native Method)
at josx.rcxcomm.LLCHandler.<init>(LLCHandler.java:18)
at josx.rcxcomm.RCXPort.<init>(RCXPort.java:18)
at Send.main(Send.java:9)
C:\>
The irtower.dll file is not in the bin directory of the final lejos version, so I downloaded an old version of lejos (lejos_win32_1_0_5) got the dll and put it into the bin version of the lejo distro I was using. I still get this message. What is going on? By the way, I can compile and run non lejos java programs fine.
Any help thanks.
V
