Can't start .jar file (using LWJGL)

后端 未结 2 492
无人共我
无人共我 2020-12-21 07:18

Good day!

I created jar file (using Netbeans) and i can\'t start it. This project uses lwjgl libraries. Inside my IDE it works well.

I use next command:

2条回答
  •  温柔的废话
    2020-12-21 07:22

    From the LWJGL wiki:

    LWJGL consists of two parts, a java part and a native code part. You must setup both of these parts properly in order for lwjgl to work. In order to setup the java part you must add lwjgl.jar to the classpath (as an external library jar). As for the native part (*.dll files on windows, *.so on linux, *.jnilib on mac, etc) you must tell java which folder the natives are located in for LWJGL to be able to find them (use the -Djava.library.path=path/to/dir vm parameter to do this).

    It seems that you're missing the second part - having the native library on your java.library.path.

提交回复
热议问题