Page 1 of 1

Missing phidgetsJava library from SBC4s

Posted: Sat Feb 12, 2022 11:57 pm
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

Re: Missing phidgetsJava library from SBC4s

Posted: Sun Feb 13, 2022 10:48 am
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.

Re: Missing phidgetsJava library from SBC4s

Posted: Tue Feb 15, 2022 11:28 am
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