Community
cancel
Showing results for 
Search instead for 
Did you mean: 
RRemi1
Beginner
928 Views

Edison with Mraa/Java/Maven

Hi,

I've been trying some of the java examples from mraa and they work. I had a look at this tutorial "https://www.geoffhayward.eu/tags/edison Blinking an LED with Java on the Intel Edison " and this relevant question (from Galileo community) "/message/394921 MRAA with Java".

Now my problem is that whenever I compile/build the same examples with maven (executable jar with dependencies included), I get this error:

Provide an int arg if you want to flash on something other than 8

Exception in thread "main" java.lang.ExceptionInInitializerError

at mraa.Gpio.(Gpio.java:47)

at BlinkIO.main(BlinkIO.java:57)

Caused by: java.lang.NullPointerException

at mraa.mraaJNI.(mraaJNI.java:305)

... 2 more

I've included the mraa dependency in my pom.xml

io.mraa

mraa

1.5.1

Am missing something else?

Thanks in advance!

Remi

0 Kudos
3 Replies
idata
Community Manager
35 Views

Hi Remi,

 

 

Thanks for contacting us!

 

 

I appreciate all the information provided, I have found this guide in order to use Mraa on the Intel Edison with Maven and Eclipse, please take a look at this link: http://appiot-docs.azurewebsites.net/?p=9331 http://appiot-docs.azurewebsites.net/?p=9331, and let me know if that information helps or if you have any other question.

 

 

Regards,

 

-Yermi

 

RRemi1
Beginner
35 Views

It seems to be a purely packaging problem with maven I suppose. Exporting as executable jar with Eclipse (which works) seems to include all dependencies whereas with maven it doesn't.

I've tried all kind of tricks with http://maven.apache.org/plugins/maven-assembly-plugin/ maven-assembly-plugin and http://maven.apache.org/plugins/maven-shade-plugin/ maven-shade-plugin without success.

I'm resting my case here since it has nothing to do with the board itself.

Thanks for the tip Yermi

Regards,

Remi

idata
Community Manager
35 Views

Hi Remi,

 

 

You're welcome, we are here to help you.

 

 

Regards,

 

-Yermi

 

Reply