Close

Goodbye rxtx, Hello nrjavaserial!

A project log for Chirp! A Low Cost Function Generator

A cheap function generator for my lab that can do sine, square, and triangle waves and be automated using serial commands

mike-lembergerMike Lemberger 08/10/2016 at 21:240 Comments

The Chirp GUI application was previously using RXTXcomm JAR from rxtx.qbang.org and the Windows 64-bit DLLs from Mfizz for its serial communications.

Everything worked pretty good until I started investigating making the application a single standalone JAR (Java Archive) file. Eclipse is able to create a standalone executable JAR and does this for you in a few easy clicks in Eclipse (Right click > Export > Runnable JAR file). However, it presents some real challenges if we wanted to automatically create a runnable JAR file on code check-in.

A JAR file is effectively a Java ZIP file and can be setup to run as a stand alone executable, much like how a stand alone EXE file can be made to not require any additional files.

While it is possible to create an executable JAR file that contains other JAR files, the DLL files required by rxtxcomm needed to be extracted out of the runnable JAR file in order to be used. This complicated things a bit and I found that this is one of the solutions that the nrjavaserial library provided.

Discussions