1

After I finished programming a small game, which uses two DS4-Controllers, I tried to run it on my raspberry pi. Since java is installed in raspbian, I only need to install jinput, which I did by typing sudo apt-get install libjinput.java. Everything semeed to work fine. So I tried to run my Game, which I wrote in Windows/eclipse, but I keep getting errors no jinput-linux64 in java.libary.path. Did I use the wrong natives in jarsplice to create the "Fat Jar"?

Thanks Tim

Timf2000
  • 29
  • 4

1 Answers1

0

You need install Jinput for arm linux. you can instal it by

sudo apt-get install libjinput-java libjinput-java-doc libjinput-jni

then find these file on your raspberry pi after installation

jinput-20100502.jar
jinput.jar
jinput-test.jar
libjinput-linux.so
libjinput.so

make a new directory called (let's say) lib in your working directory (a you can name it as you wish) copy all the files above to the directory lib you just made. then compile the java file by this way :

sudo javac -cp "/usr/share/java/jinput.jar" Example.java

then run it by this way :

sudo java -Djava.library.path=./lib -cp ./lib/*:. Example

if you make the Example.java from netbeans, remove the package info line at the top. it should work.

iBug
  • 35,554
  • 7
  • 89
  • 134