RFID Reader Host SDK for Java on Linux Unable to initialize main class rfidsample.RFIDMainDlg

R Rhett Place 2 years ago
83 0 0

I am trying to execute the sample applications included in this download; https://www.zebra.com/us/en/support-downloads/software/developer-tools/…

Running on a newly built Ubuntu 18.04 instance.

I've followed the instructions in the ReadMe.txt file exactly. (show below)
When I execute the command to run the application...

java -cp "J_RFIDHostSample1.jar:/home/ubuntu/linux64_sdk/lib/Symbol.RFID.API3.jar" rfidsample.RFIDMainDlg

I get, "Error: Unable to initialize main class rfidsample.RFIDMainDlg
Caused by: java.lang.NoClassDefFoundError: com/mot/rfid/api3/InvalidUsageException"

Are the additional steps necessary? I also tried running the prebuilt binaries, same error.

Here are the ReadMe.txt instructions.....

Prerequisite for Building Java Apps
-------------------------------------
Ubunt 16.04/Ubuntu 18.04:
------------------------
JDK 1.8
Install following package:
$ sudo apt-get install ant
(ant version: 1.9.6-1ubuntu1.1 for Ubuntu 16.04/1.10.5-3~18.04 for ubuntu 18.04)

steps to build J_RFIDHostSample1 for Java
------------------------------------------
cd samples/src/java

Execute the following
ant -f J_RFIDHostSample1 -Dnb.internal.action.name=rebuild clean jar

Java Application will be available in
linux64_sdk/samples/src/java/J_RFIDHostSample1/dist

Steps to run the J_RFIDHostSample1 for Java
-------------------------------------------
cd dist
export LD_LIBRARY_PATH=[HOME_DIR]/linux64_sdk/lib
java -cp "J_RFIDHostSample1.jar:[HOME_DIR]/linux64_sdk/lib/Symbol.RFID.API3.jar" rfidsample.RFIDMainDlg

CONTACT
Can’t find what you’re looking for?