View Full Version : Porting Java Windows app to Mac
Jan 31, 2006, 10:46 PM
I've got an interesting project that I'm looking for some help on. There's a company called DSMlink that makes an ECU tuning package for the Mitsubishi Eclipse, which I own. Their software is Windows only, but the app is written in Java. They distribute the source code freely, and if you download it, it will launch and run on a Mac. It won't, however, recognize the connection to the car's ECU. The setup comes with a serial cable that plugs into the car's diagnostic port. I'm using a USB-serial converter. I'm guessing that making it work would be pretty straightforward, but I'm lost as far as what to do. Any help would be appreciated. Here's the link to the software download, where you can find the full windows version and the .jar file:
Jan 31, 2006, 11:23 PM
This software package relies on the javax.comm package. According to the Sun page for javacomm (http://java.sun.com/products/javacomm/), this is only available for solaris and linux implementations. Microsoft may have supplied their own implementation. A quick check of the javadoc for the mac java implementation shows that apple has not provided a javax.comm implementation. Googling javax.comm and mac brought up Patrick Beard's mac implementation of javax.comm (http://homepage.mac.com/pcbeard/javax.comm.MRJ/). Basically, the java virtual machine and any packages that require low level implementation must have platform-native binaries. In general, most of these native libraries are supplied with the virtual machine, but I believe java implementations are not required by sun to implement javax classes. In the case of javax.comm, this requires writing native libraries as well as java interfaces to these natives libraries. Apparently Apple decided it wasn't worth the hassle, even though it would seem that all that is required would be basic wrappers to the native communications interfaces. If you have any luck with this third party library, I'd love to hear about it.