2

I am new to java and I am trying to use a sample 'Hello world' C function in Java using Bridj on Raspberry pi B+(armv6l). I downloaded Bridj source code and installed it using maven. Then I downloaded JNAerator and generated a java code out of my C code. Now how can I use this generated java in my java code. Also I have a .so library(C binaries) which I want to use in java I tried placing this .so in org/bridj/lib/linux_armhf/ path and tried using it in my code but it throughs 'sementation fault'. Can someone help me to solve this problem. Also do Bridj supports RPI B+ or I should use dyncall to support it.I don't have a GUI and I work on commandline.

For generating java code out of C I am using :

java -jar jnaerator.jar -library Test Test.h -o . -v -noJar -noComp

For compiling my java code :

javac -classpath .:/home/pi/bridjtest/bridj-0.7.1-SNAPSHOT.jar Sample.java
Ravi
  • 986
  • 12
  • 18
  • OMG... wouldn't be better to switch onto Java.... – Brethlosze May 29 '15 at 03:56
  • Some counterquestions: 1. Did your Bridj libraries work under Java? 2. Were you able to run the C code inside Java? 3. Did both these case run well in Java inside RPi? – Brethlosze May 29 '15 at 03:58
  • I've only ever gotten segmentation fault when using jnaerator on a raspberry pi. I have had success using bridj on it's own, however. – Noah Ternullo Jul 08 '16 at 14:51

0 Answers0