NoClassDefFoundError: com/phidget22/Parity
Posted: Tue Dec 20, 2022 7:51 am
I copied an example program from https://www.phidgets.com/?view=api, but I cannot get it to run:
Example code from method open():
import com.phidget22.*;
class Example {
public static void main(String[] args) {
try {
VoltageInput ch = new VoltageInput();
ch.open();
ch.close();
} catch (PhidgetException ex) {
System.out.println("Failure: " + ex);
}
}
}
Compiled on Ubuntu Linux 20.04.5 LTS using OpenJDK 1.8.0_352:
$ javac Example.java
When I run the program, it fails with NoClassDefFoundError: com/phidget22/Parity:
$ java Example -cp phidget22.jar
Couldn't FindClass com/phidget22/ParityException in thread "main" java.lang.NoClassDefFoundError: com/phidget22/Parity
It is true I cannot find this class in the src directory of the libphidgetjava build. What is wrong?
Is there a class, "Parity" or "ParityException"? I'm guessing my installation is corrupt somehow? Ideas?
Example code from method open():
import com.phidget22.*;
class Example {
public static void main(String[] args) {
try {
VoltageInput ch = new VoltageInput();
ch.open();
ch.close();
} catch (PhidgetException ex) {
System.out.println("Failure: " + ex);
}
}
}
Compiled on Ubuntu Linux 20.04.5 LTS using OpenJDK 1.8.0_352:
$ javac Example.java
When I run the program, it fails with NoClassDefFoundError: com/phidget22/Parity:
$ java Example -cp phidget22.jar
Couldn't FindClass com/phidget22/ParityException in thread "main" java.lang.NoClassDefFoundError: com/phidget22/Parity
It is true I cannot find this class in the src directory of the libphidgetjava build. What is wrong?
Is there a class, "Parity" or "ParityException"? I'm guessing my installation is corrupt somehow? Ideas?