Serial Communication with Palm OS - Part 4/4
On Windows XP and Java
Be warened: Windows XP is outdated since a few years and it shouldn'te be used on a production base. Best way to use it, is without a Wifi- or LAN-Connection.
Sometimes, there are applicationw, which only run on Windows XP, like CodeWarrior 9 for Palm OS Development. This IDE has an advantage over the development on Ubuntu: The Debugger works just fine out of the box. This is on reason why this article exists.
For developing applications on Windows XP I got myself Fujitsu Futro S900, which is not perfect in this case, but it is doing the job and has some advantages like the fan-less design and the two serial ports. On the down side it is a bit slow, especially for the Eclipse IDE.
A few words regarding Eclipse and the needed Java JDK: On Windows XP Eclipse "Helios" works great and as a JDK java-1.8.0-openjdk-220.127.116.11-1.b09.ojdkbuild.windows.x86_64.zip is still availabe. Just download the "java-1.8.0-openjdk-18.104.22.168-1.b09.ojdkbuild.windows.x86_64.zip" and extract it into a folder for your choice. Afterwards the path pointing to "...\java-1.8.0-openjdk-22.214.171.124-1.b09.ojdkbuild.windows.x86\bin" must be inserted into the PATH environment variable.
In order to be able to communicate or receive data from a Palm through the serial port, like on Ubunut, a library is needed, which provides this possiblity. I had the least problems with "jSerialComm".
Installation of jSerialComm
The only step, which is mandatory, is to copy the .jar- and .dll-file into the eclipse-project-folder and integrate the .jar-file into your project:
- Click on the project and hit "Alt+Enter" to open the properties for the project
- Select "Java Build Path" in the menue.
- Select the "Libraries"-Tab.
- Add the jSerialComm.jar via the "Add External JARs..."-button.
Now, everyhting is set up for creating the application. There are some examples out there to create a small programm, which let you read from the serial interface. The following example is very simple:
The source-code is based on this example.
After the programm gets executed and some data was sent from the related Palm OS Application, which was created here, it should look like this: