How to setup LWJGL with Maven?

Dark Furby :

Im unable to successfully add proper dependencies for LWJGL in maven project. I have copied lwjgl dependency tempalte from maven repository, added it to my pom.xml and tried to run basic application from lwjgl.org, without success.

Below you have my pom.xml file, unfortunately when I try to run my first application i get:

Exception in thread "main" java.lang.UnsatisfiedLinkError: Failed to locate library: lwjgl.dll

I found some sollution that I need to download all jars and attach them as jar library, so I did. File > Project Structure > Librarires > added folder which store all jars for LWJGL, unfortunately this is still not working.

<dependencies>
<dependency>
    <groupId>org.lwjgl</groupId>
    <artifactId>lwjgl</artifactId>
    <version>3.2.1</version>
</dependency>
<dependency>
    <groupId>org.lwjgl</groupId>
    <artifactId>lwjgl-glfw</artifactId>
    <version>3.2.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.lwjgl/lwjgl-opengl -->
<dependency>
    <groupId>org.lwjgl</groupId>
    <artifactId>lwjgl-opengl</artifactId>
    <version>3.2.1</version>
</dependency>
<dependency>
    <groupId>java3d</groupId>
    <artifactId>vecmath</artifactId>
    <version>1.3.1</version>
</dependency>
</dependencies>
httpdigest :

Please go to https://lwjgl.org/customize, select a variant (Release, Stable or Nightly), select "Mode" = "Maven", select all your needed/wanted modules and simply copy/paste the produced pom.xml snippet.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=152521&siteId=1