[Coco] DriveWire in Java

Steven Hirsch snhirsch at gmail.com
Fri Dec 11 17:36:56 EST 2009


On Fri, 11 Dec 2009, Aaron Wolfe wrote:

> On Fri, Dec 11, 2009 at 9:49 AM, Frank Swygert <farna at att.net> wrote:

>> I thought the whole idea behind Java was portability -- in that as long as
>> the version of Java (or higher) used to write the code was available for
>> another platform it should run -- the Java code on the platform would take
>> care of platform/OS specific things? So Java code written for Java V. xx.x
>> (or whatever) would run on any platform with Java V. xx.x on it???

> That's the idea, and for some things Java does work this way.
> Unfortunately, any time you get very close to the hardware (in this
> case any time I use a GUI component or talk to the serial ports) then,
> while the source code does not need to change, the native libraries
> do.

I'll second this one in spades!  They are constantly changing subtle 
aspects of the GUI class behavior and no two vendors' Java implementations 
are exactly alike in this regard.  Combine that with the fact that few 
programmers are disciplined enough to write deadlock-free threaded code 
and you have a real crap-shoot.

> Mr. Hathaway clued me in to launch4j, which does many things to make
> distribution of java applications easy on the user.  It can even
> package a whole JRE along with the app, although that makes the
> distibution file pretty large.   The one thing it might not be able to
> do is to make the RXTX native serial libraries I'm using automatic,
> but I haven't fully explored this yet.   At some point Java will
> (hopefully) have decent serial support built in, so this issue may be
> temporary anyway.

Cool.  Should be helpful.

> I believe that one way or another, we will be able to have "download,
> click and run" simplicity for a java Drivewire server.  Still sorting
> out the details though :)

Nice work.  If you have the intestinal fortitude to write it once and test 
+ package it everywhere, you're a better man than I.  I'll stick to C++, 
where it's safe and warm...

Steve


-- 



More information about the Coco mailing list