Moved Eclipse projects to the MacBook

Supporting 10.7 and up
Jorge
Fresh meat
Posts: 3
Joined: Mon Jun 23, 2014 8:57 pm
Contact:

Moved Eclipse projects to the MacBook

Postby Jorge » Mon Jun 23, 2014 9:14 pm

Last week, I moved my Phidgets projects from my old Linux notebook to my new MacBook.

I have installed the Phidgets21.DMG file but keep getting the following error when I try to run the applications.

Exception in thread "main" java.lang.ExceptionInInitializerError: no phidget21 in java.library.path
Could not locate the Phidget C library.
The Mac Phidget21 DMG must be installed.

etc...

The aggravating thing is that they run fine on the old Linux box. I have reinstalled the OS X drivers and also tried adding setting LD_LIBRARY_PATH=/usr/local/lib in the Eclipse run configurations (as listed in another thread). Still no luck.

Interstingly, I cannot even run the samples via: “java -jar -Djava.library.path=/usr/local/lib TextLCD-full.jar”

I get the same error message (Could not locate the Phidget C Library…).

I am on:
OS X 10.9.2
Java 1.8.0_05
Eclipse Enide

Any suggestions?

Jorge
Fresh meat
Posts: 3
Joined: Mon Jun 23, 2014 8:57 pm
Contact:

Re: Moved Eclipse projects to the MacBook

Postby Jorge » Tue Jul 01, 2014 6:39 pm

Well...

Just a quick update. I've been at it a few days and still no luck. I've even tried crazy things like reinstalling eclipse and the Phidgets drivers in different orders.

But I cannot seem to get the Java applications to see the drivers.

Maybe a new Macbook??? or simply return it?

Jorge
Fresh meat
Posts: 3
Joined: Mon Jun 23, 2014 8:57 pm
Contact:

Re: Moved Eclipse projects to the MacBook

Postby Jorge » Tue Jul 15, 2014 9:11 pm

An update on this silly problem - I got called off on another project hence the late update.

As it turns out, I believe I had two problems. The first is that I was using an older version of the JAR file from the project import. And then the second one was that although I had the JAR file declared in the build path as an external file.. I never expanded the JAR file (in the Eclipse build path dialog box) and set the 'Native Library Location' to '/Library/Java/Extensions'

By correcting those two issues, I now have the examples running beautifully. Now to deal with the bugs in my own code.

But first a whiskey as a reward.


Return to “macOS”

Who is online

Users browsing this forum: No registered users and 1 guest