简体   繁体   English

蚂蚁组装的.jar找不到LWJGL本机

[英]Ant-assembled .jar cannot find LWJGL natives

To keep it short & sweet, I have written an ant file that compiles my source code, unjars the libraries for slick2d, nifty, etc, zips that up into it's own jar and then copies the lwjgl native dlls into the same folder, so the folder layout is something like this: 为了简短起见,我编写了一个ant文件来编译我的源代码,解压缩slick2d,nifty等库,将其压缩到自己的jar中,然后将lwjgl本机dll复制到同一文件夹中,因此文件夹布局是这样的:

/bin/
 output.jar
 lwjgl.dll
 lwjgl64.dll

But for some reason, output.jar gives me an UnsatisfiedLinkException saying it cannot find the natives. 但是由于某种原因,output.jar给了我一个UnsatisfiedLinkException,说它找不到本地人。 Any ideas on what I can do? 关于我能做什么的任何想法? I got the same result while packing the natives inside the .jar file too. 将本地人打包到.jar文件中时,我得到了相同的结果。

The path to DLL is not in the search path. DLL的路径不在搜索路径中。

This question is very close to Java - Loading dlls by a relative path and hide them inside a jar if not a direct duplicate. 这个问题与Java非常接近-通过相对路径加载dll,如果不是直接重复,则将其隐藏在jar中

Aproach is Embed DLL as a resource in jar, extract the DLL somewhere and then load it. 方法是将DLL作为资源嵌入jar中,将DLL提取到某处然后加载。 ( JNA does this) JNA这样做)

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

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