Include native libraries in a JAR - IntelliJ?

笑着哭i 提交于 2019-12-13 05:49:58

问题


I just started using LWJGL, and it's working fine. But when I export my project to a JAR file, it's not working fine.

I found out how I can include my LWJGL JAR in the program JAR file, but I want the natives in there as well, so people don't need to download much s#!t to use my program.

How can I do this in IntelliJ?

When I run the JAR file, I get a java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path error. I know I can do -Djava.library-path="<path_to_native>", but I want my program to be easy-to-use for others. The most easy way is if I just have one file - the JAR. So is it possible to get the natives inside the JAR? - how?

Sidenote: sorry if my english is bad, I'm not a native english speaker

来源:https://stackoverflow.com/questions/53599426/include-native-libraries-in-a-jar-intellij

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!