我正在尝试将jinput添加到我的项目中。我使用Netbeans作为IDE。我真的无法在jinput上找到任何没有破坏或古老的资源。我真的希望Maven方法能够工作,但似乎找不到存储为Runtime Dependencies的相应驱动程序。
这是我的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>controller</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>net.java.jinput</groupId>
<artifactId>jinput-platform</artifactId>
<version>2.0.6</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>net.java.jutils</groupId>
<artifactId>jutils</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>net.java.jinput</groupId>
<artifactId>jinput-platform</artifactId>
<version>2.0.6</version>
<classifier>natives-windows</classifier>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>net.java.jinput</groupId>
<artifactId>jinput-platform</artifactId>
<version>2.0.6</version>
<classifier>natives-linux</classifier>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>net.java.jinput</groupId>
<artifactId>jinput-platform</artifactId>
<version>2.0.6</version>
<classifier>natives-osx</classifier>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>net.java.jinput</groupId>
<artifactId>jinput</artifactId>
<version>2.0.6</version>
</dependency>
</dependencies>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>
当我尝试从他们的GIT仓库运行其中一个jinput测试类时,我遇到的错误是:
java.lang.UnsatisfiedLinkError: no jinput-raw_64 in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1857)
所有驱动程序都是jinput-platform依赖项的一部分。请注意,代码本身没有编译器问题。我很确定问题是在运行时找到合适的库。有什么建议?