How can I use the Jinput library in my maven project when it needs the binaries?
I want to use Jinput in my Maven project. So what I've done is to add the dependency to the projects POM. But when I try to run the application, I get an error since it cannot find the binaries it needs to use the library. How should I solve this? Should I browse the web for the binaries and download them manually, and put the in java.library.path? Or is there some way to tell maven where the binaries are located? Here's my POM <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.mycompany</groupId> <artifactId>ProjectA</artifactId> <version>1.0-SNAPSHOT</version> <packaging>jar</packaging> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target> </properties> <dependencies><!-- https://mvnrepository.com/artifact/net.java.jinput/jinput --> <dependency> <groupId>net.java.jinput</groupId> <artifactId>jinput</artifactId> <version>2.0.7</version> </dependency> </dependencies> </project> Edit: I should add that I'm trying to run the project from the NetBeans IDE, using the "run project" action Edit2: When building the project, I get a subfolder in the project root named "target". This folder contains the following files/folders classes/ generated-sources/ maven-archiver/ maven-status/ test-classes/ ProjectA-1.0-SNAPSHOT.jar UPDATE I just realized the jinput library has "platform" artifacts aswell (https://mvnrepository.com/artifact/net.java.jinput/jinput/2.0.7). Do I need to add these as dependencies, too?
Use copy goal of maven-dependency-plugin to copy the libraries in any folder, e.g lib/. Then, make sure to put these libraries in java classpath while running the application. For example, if you have a jar file of your application, you can add lib folder in classpath as , java -jar myapp.jar -cp "lib/*"
Selenium tests failing in Unix
Maven - How to build a dependency project
How to make maven consider JavaFX as a part of JRE
Maven plugin prefix resolution doesn't seem to work as expected
Run TestNG single test from one Group
TinyRadius maven repository
Dependency downloaded from Maven Central is free from Malware?
How to use the same target platform multiple sub-projects in Tycho
Maven Grails web.xml
Can I make a Maven profile add webResources to a war and still add non-profiled webResources?
HTTP Status 409 - The target deployment path […] does not match the POM's expected path prefix
Maven command to go back to previous day snapshot
Maven site on multi module project could not resolve dependency
Glassfish Maven Deploy Plugin - Deployment Failure
zmq failed when running unit test in Intellij IDEA with Maven