[kaffe] kaffe & rxtx
Dan
dansix@pobox.com
Mon Apr 14 17:12:01 2003
yeah, rxtx works with Kaffe (the CVS version as of a week ago).
I made it a lot harder than it should have been (I always do).
Follow the rxtx install locations for the sun jdk 1.1
delete the kaffe comm.jar then put:
javax.comm.properties in <kaffe>/jre/lib
comm.jar in <kaffe>/jre/lib
jcl.jar in <kaffe>/jre/lib
librxtx* in <kaffe>/jre/lib/i386
when jcl.jar and comm.jar are not in the right place, even though they are in the
classpath, things don't seem to work well. If kaffe can find comm.jar and not jcl.jar I
wasn't getting any errors or anything, just no ports found. hmm.
Anyway, it works. Im happy.
Here is my test program if anyone else is going to use rxtx. It simple lists all available
ports:
-------------------- [SNIP CommCheck.java] --------------------------
import javax.comm.*;
import java.util.*;
// List all of the ports on my computer.
public class CommCheck {
public static void main(String[] args) {
// e = All PortIdentifiers on the computer (parallel,
serial, etc)
Enumeration e = CommPortIdentifier.getPortIdentifiers();
while (e.hasMoreElements()) {
CommPortIdentifier PortID = (CommPortIdentifier)
e.nextElement();
System.out.print( PortID + " is " + PortID.getName()
);
switch( PortID.getPortType() ) {
case CommPortIdentifier.PORT_SERIAL:
System.out.print( ", serial port" );
break;
case CommPortIdentifier.PORT_PARALLEL:
System.out.print( ", parallel port" );
break;
default:
System.out.print( ", unknown port type" );
break;
}
System.out.println();
}
}
}
-------------------- [SNIP CommCheck.java] --------------------------
I also found it helpful to edit RXTXCommDriver.java and RXTXPort.java and set the
debug variables to true. This dumps all sorts of stuff to thecrseen but then you know
for sure that the native drivers have been found and loaded, what ports its finding
and that you need to deal with the lock files and all that.
Dan
On 9 Apr 2003 at 7:02, Dalibor Topic wrote:
> Hi Dan,
>
> --- Dan <dansix@pobox.com> wrote:
> > anyone got rxtx working with kaffe?
>
> I think several people have tried, and currently it
> may not work. I believe that's due to kaffe's
> incomplete implementation of javax.comm api (no native
> methods provided, AFAIK).
>
> If you can get rxtx to work with kaffe, I wouldn't
> mind merging in rxtx's implementation of javax.comm
> instead of what we have now.
>
> If you want to try it, remove kaffe's comm.jar from a
> kaffe installation and try to use rxtx instead. Please
> report back how it went.
>
> cheers,
> dalibor topic
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Tax Center - File online, calculators, forms, and more
> http://tax.yahoo.com
>
> _______________________________________________
> kaffe mailing list
> kaffe@kaffe.org
> http://kaffe.org/cgi-bin/mailman/listinfo/kaffe
>