1

I am trying to use the Oracle Device I/O library.

I have made the dio following the instructions on the oracle page and copied the build folder onto by development PC. I added the built jar to my project on my IDE(Intellij IDEA) with the natives I could find. I'm running the program on my RPI using the embedded systems plugin for IDEA. The code can be seen on my github:

Main class: https://github.com/MAWoodMain/RPITank/blob/master/src/main/java/Main.java

Invoked class: https://github.com/MAWoodMain/RPITank/blob/master/src/main/java/sensors/MPU9250/MPU9250_Oracle.java

The code is largely irrelevant because my issue is deployment/execution.

MAWood
  • 99
  • 1
  • 13
  • Please show how you are running the application. It looks like you haven't configured the system property `java.library.path` with the location of the native library (or you are missing the native library). – Mark Rotteveel Jul 14 '16 at 13:57
  • Thanks for the reply, here is an image of the library config: http://imgur.com/9DtVbmp – MAWood Jul 14 '16 at 14:29

1 Answers1

1

After some research I discovered I can specify the native locations in the VM options, the options I used to solve the problem were:

-Djava.library.path=/home/pi/dio/dev/build/so/ -classpath .:classes:/home/pi/dio/dev/build/ -Djava.security.policy=/home/pi/gpio.policy -Djdk.dio.registry=/home/pi/dio.properties 

This also includes the properties and policy files necessary to use DIO.

MAWood
  • 99
  • 1
  • 13