How To Compile JAVA API On Raspberry Pi 1
How To Compile JAVA API On Raspberry Pi 1
Raspberry Pi
_________________________________
Introduction
This document contains the steps to compile the ThingMagic® Mercury API Java on Raspberry Pi.
Steps
Note: Use sudo (root user) to compile and run the Mercury API
export PATH=$PATH:$JAVA_HOME/bin
6. Download the latest Mercury API available from the JADAK website using the below link:
https://www.jadaktech.com/documentation/rfid/mercuryapi/
**Note- The general error you could see is when Java complains about missing linux-arm.lib. When
this error occurs, it can't find the required libraries for using the serial ports on your system. Here is
how to recompile them:
c/proj/jni
• That has the Makefile for compiling the proper lib driver.
• Next, find the jni.h file on your system:
• Run make command make -f Makefile.jni. This will result a file named libSerialTransportNative.so.0,
which you will rename to linux-arm.lib
• Now, traverse back to mercuryapiX.X.X/java
• Extract the mercuryapi.jar file using command jar xf mercuryapi.jar or use the instructions available
at https://docs.oracle.com/javase/tutorial/deployment/jar/unpack.html
• Now you will have a folder named “com” in the current(java) folder.
• Copy the mercuryapi.jar file from the Java directory into com/thingmagic.
• Copy the linux-arm.lib file you created before into java/com/thingmagic (there are a few other .lib
files there).