Page 1 of 1

java error when running phidgets jar file

Posted: Fri Dec 14, 2018 5:07 am
by zman8324
I have tried various methods to install jre and jdk on Ubuntu 18 (Linux) according to directions posted, but no luck. It must be missing a file or have a file in a folder that can’t be found. I am getting a runtime error on a jar file compiled from a java program. The same exact setup of java program, on Ubuntu, jre and jdk worked on other computers, so something has changed in the version of java. I get this runtime error:
Couldn’t get Method ID from voltageRationInput_classException in thread “main” java.lang.NoSuchMethodError:
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
etc…

someone suggested the jre and jdk for java, javac don’t match but that is not true. I keep uninstalling and reinstalling different methods with no luck. I suppose I could go back and find older version tar files if necessary.

Anyone have ideas of how to fix this?

Re: java error when running phidgets jar file

Posted: Fri Dec 14, 2018 8:47 am
by mparadis
I'm not sure if this typo is in your code or just in this post, but there's an extra 'n' in the middle of "voltageRatioInput" that could be causing the problem.

Re: java error when running phidgets jar file

Posted: Fri Feb 15, 2019 7:07 am
by KimberlyBuckland
'm doing a java project using a phidget accelerometer (phidgets.com) and I get the error

sudo java -jar phidgetTester.jar
/usr/lib/jvm/java-6-openjdk/jre/lib/i386/client:/usr/lib/jvm/java-6-openjdk/jre/lib/i386:/ arynews .tv usr/lib/jvm/java-6-openjdk/jre/../lib/i386:/usr/java/packages/lib/i386:/usr/lib/jni:/lib:/usr/lib
making new phidget
CRIT: Couldn't get Field ID managerPhidget from phidget_class
Exception in thread "main" java.lang.NoSuchFieldError: managerPhidget
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1750)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1675)
at java.lang.Runtime.loadLibrary0(Runtime.java:840)
at java.lang.System.loadLibrary(System.java:1047)
at com.phidgets.Phidget.<clinit>(Phidget.java:26)
at phidgettester.PhidgetTester.<init>(PhidgetTester.java:40)
at phidgettester.main.main(main.java:15)