Parallel port with Java (Win32) |
Written by Fred | |
Tuesday, 14 October 2008 | |
How to do low level I/O with Java on Windows.
In the Windows world, the win32COMM API allows to control a serial port bit I have never seen such a Java library for the parallel port. Here follows th source code of a Java class that allow to control a parallel port with Java on Windows. This class makes JNI (Java Native Interface) calls to read/write on the parallel port. Indeed this class calls a JNI compliant dll. In order to achieve that I started with the inpout32.dll source code downloaded from http://www.logix4u.net. Then I change the source code so that it can be called from a Java layer by the means of JNI. It's possible to port that to a Linux platform. It would require to write the native part that handles I/O on the parallel port. On Linux, it would be a dynamic library and the file extension would be .so. For the moment, it is just a test application: you can download the source code. |
|
Last Updated ( Tuesday, 14 October 2008 ) |
< Prev | Next > |
---|