Missing phidgetsJava library from SBC4s

Supporting Java SE version 7 and up
Post Reply
bgmoon
Fresh meat
Posts: 4
Joined: Thu Feb 10, 2022 8:31 am
Contact:

Missing phidgetsJava library from SBC4s

Post by bgmoon »

OK, I have installed Java on the SBC4. I have a java application that runs on my MAC that connects to fidgets directly connected to the MAC. I build that image with the phidgets22 JAR in the libs directory, referenced from my Manifest in my application JAR file. When I try to run the application on the SBC4 it complains that its missing the native library libphidget22java.so from all the search paths? I can't find this file anywhere to download and install. I was able to confirm that other phidgets22 "so" files are in the expect path. What gives? How do I get that missing file and from where? I would have thought that the SBC4 would have come with that file already installed?

Code: Select all

root@phidget1:~/dist# java -jar Light.jar
Exception in thread "main" java.lang.ExceptionInInitializerError: no phidget22java in java.library.path: [/usr/java/packages/lib, /usr/lib/arm-linux-gnueabihf/jni, /lib/arm-linux-gnueabihf, /usr/lib/arm-linux-gnueabihf, /usr/lib/jni, /lib, /usr/lib]
Error loading the Phidget C libraries (libphidget22.so and libphidget22java.so).
Make sure they are available, and add their path to LD_LIBRARY_PATH, or specify with java.library.path.
	at com.phidget22.PhidgetBase.<clinit>(PhidgetBase.java:36)
	at io.whiteStar.lightSwitch.LightSwitch.<init>(LightSwitch.java:183)
	at io.whiteStar.lightSwitch.LightSwitch.main(LightSwitch.java:456)
[2022-02-13 11:31:59.830] [INFO   ] [SecurityManager] Created directory /root/LightSwitch/security
bgmoon
Fresh meat
Posts: 4
Joined: Thu Feb 10, 2022 8:31 am
Contact:

Re: Missing phidgetsJava library from SBC4s

Post by bgmoon »

Figured it out. I installed java via apt-get install rather than using the web user interface. The web user interface failed to install java because I needed to upgrade the OS first. Once I upgraded the OS, I was able to install java via the web interface. That interface also includes downloading the Phidgets libraries. Its a shame I was not able to find any of those libraries to be able to download them on my own :(

But at least I have them now.
User avatar
Patrick
Lead Developer
Posts: 3403
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Missing phidgetsJava library from SBC4s

Post by Patrick »

The linux libraries/packages are documented on the Linux OS page: https://www.phidgets.com/docs/OS_-_Linux

The java library package is called libphidget22java

-Patrick
Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests