简体   繁体   English

无法运行已编译的jar文件

[英]Unable to run compiled jar file

so I am making a program that implements the LWJGL library for controller input. 所以我正在制作一个程序,该程序实现LWJGL库用于控制器输入。 it's the only library I use in this that is not built into java. 这是我使用的唯一未内置在Java中的库。 it wont run when i double click it, and it gives me the following intersting errors when I run it from the command line with java -jar 当我双击它时它不会运行,当我使用java -jar从命令行运行它时,它会给我以下有趣的错误

WARNING: Found unknown Windows version: Windows 7
Attempting to use default windows plug-in.
Loading: net.java.games.input.DirectAndRawInputEnvironmentPlugin
java.lang.UnsatisfiedLinkError: no jinput-dx8_64 in java.library.path
    at java.lang.ClassLoader.loadLibrary(Unknown Source)
    at java.lang.Runtime.loadLibrary0(Unknown Source)
    at java.lang.System.loadLibrary(Unknown Source)

I think it's a problem in the classpath, but I'm not entirely sure. 我认为这是类路径中的问题,但我不确定。 any help would be greatly appreciated. 任何帮助将不胜感激。


it won't let me answer my own question, but I figured it out. 它不会让我回答我自己的问题,但我已经知道了。 I needed to put the DLL files that came with JInput into the same directory as my JAR file 我需要将JInput随附的DLL文件放入与我的JAR文件相同的目录中

我认为本机库应该与您的lwjgl lib一起分发,但是,如果不是,请从此处下载丢失的文件,然后将其放在与项目相同的目录中,或者将其添加为本机,从而将其放在类路径中库到您的lwjgl jar(在Eclipse中),或者在尝试运行jar时使用-classpath

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM