问题
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