Setup jinput maven project

450 Views Asked by At

I need a maven project via which I will be able to retrieve signals from my joystick. I set it up, by calling mvn package command I'm building JAR file. But there are some problems with jinput native libraries. I added dependency for jinput 2.0.6 version and it automatically putting native libraries(.dll, .so and .jnilib files) to classpath(to root inside the jar file). Jinput libs are JNI libraries. But I couldn't load this file. By current solution I'm running my jar file with this JVM argument:

java -jar jinput-project.jar -Djava.library.path=/home/usr/jinput-projects/jinputlibs

jinputlibs is an external folder where are jinput libs. How can I resolve this problem? How can I use the libraries inside the jar file? Can I resolve this problem by maven(I mean by using .pom file)?

1

There are 1 best solutions below

0
On

You can download the DLLs directly and include them in your library as described here