java error when running phidgets jar file

Supporting 2.6 and up
zman8324
Fresh meat
Posts: 1
Joined: Fri Dec 14, 2018 5:01 am
Contact:

java error when running phidgets jar file

Postby zman8324 » Fri Dec 14, 2018 5:07 am

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?

User avatar
mparadis
Site Admin
Posts: 632
Joined: Fri Oct 28, 2011 12:17 pm
Contact:

Re: java error when running phidgets jar file

Postby mparadis » Fri Dec 14, 2018 8:47 am

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.

KimberlyBuckland
Fresh meat
Posts: 1
Joined: Mon Feb 11, 2019 1:49 am
Contact:

Re: java error when running phidgets jar file

Postby KimberlyBuckland » Fri Feb 15, 2019 7:07 am

'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)


Return to “Linux”

Who is online

Users browsing this forum: No registered users and 1 guest