[CLOSED] LWJGL 3.1.4, Java 9, Maven: Error - module not found

Started by Grastasss, December 01, 2017, 21:28:08

Previous topic - Next topic

Grastasss

Hello, I have migrated to Java 9.0 and have updated to LWJGL 3.1.4. Now I'm facing such an unpleasant errors when I am trying to run my module:
Quote
Error:java: module not found: org.lwjgl.opengl.natives
Error:java: module not found: org.lwjgl.glfw.natives
Error:java: module not found: org.lwjgl.natives
Error:java: module not found: org.lwjgl.nanovg.natives

Here is my *.iml file with all module dependencies:
    <orderEntry type="library" name="Maven: org.lwjgl:lwjgl-assimp:3.1.4" level="project" />
    <orderEntry type="library" name="Maven: org.lwjgl:lwjgl-nanovg:3.1.4" level="project" />
    <orderEntry type="library" name="Maven: org.lwjgl:lwjgl:3.1.4" level="project" />
    <orderEntry type="library" name="Maven: org.lwjgl:lwjgl-egl:3.1.4" level="project" />
    <orderEntry type="library" name="Maven: org.lwjgl:lwjgl-glfw:3.1.4" level="project" />
    <orderEntry type="library" name="Maven: org.lwjgl:lwjgl-jawt:3.1.4" level="project" />
    <orderEntry type="library" name="Maven: org.lwjgl:lwjgl-jemalloc:3.1.4" level="project" />
    <orderEntry type="library" name="Maven: org.lwjgl:lwjgl-lmdb:3.1.4" level="project" />
    <orderEntry type="library" name="Maven: org.lwjgl:lwjgl-nfd:3.1.4" level="project" />
    <orderEntry type="library" name="Maven: org.lwjgl:lwjgl-openal:3.1.4" level="project" />
    <orderEntry type="library" name="Maven: org.lwjgl:lwjgl-opencl:3.1.4" level="project" />
    <orderEntry type="library" name="Maven: org.lwjgl:lwjgl-opengl:3.1.4" level="project" />
    <orderEntry type="library" name="Maven: org.lwjgl:lwjgl-opengles:3.1.4" level="project" />

    <orderEntry type="library" scope="RUNTIME" name="Maven: org.lwjgl:lwjgl-nanovg:natives-windows:3.1.4" level="project" />
    <orderEntry type="library" scope="RUNTIME" name="Maven: org.lwjgl:lwjgl-assimp:natives-windows:3.1.4" level="project" />
    <orderEntry type="library" scope="RUNTIME" name="Maven: org.lwjgl:lwjgl:natives-windows:3.1.4" level="project" />
    <orderEntry type="library" scope="RUNTIME" name="Maven: org.lwjgl:lwjgl-glfw:natives-windows:3.1.4" level="project" />
    <orderEntry type="library" scope="RUNTIME" name="Maven: org.lwjgl:lwjgl-jemalloc:natives-windows:3.1.4" level="project" />
    <orderEntry type="library" scope="RUNTIME" name="Maven: org.lwjgl:lwjgl-lmdb:natives-windows:3.1.4" level="project" />
    <orderEntry type="library" scope="RUNTIME" name="Maven: org.lwjgl:lwjgl-nfd:natives-windows:3.1.4" level="project" />
    <orderEntry type="library" scope="RUNTIME" name="Maven: org.lwjgl:lwjgl-openal:natives-windows:3.1.4" level="project" />
    <orderEntry type="library" scope="RUNTIME" name="Maven: org.lwjgl:lwjgl-opengl:natives-windows:3.1.4" level="project" />
    <orderEntry type="library" scope="RUNTIME" name="Maven: org.lwjgl:lwjgl-opengles:natives-windows:3.1.4" level="project" />


Here is the list of profiles I use in pom.xml:
        <profile>
            <id>lwjgl-natives-linux</id>
            <activation>
                <os><family>unix</family></os>
            </activation>
            <properties>
                <lwjgl.natives>natives-linux</lwjgl.natives>
            </properties>
        </profile>
        <profile>
            <id>lwjgl-natives-macos</id>
            <activation>
                <os><family>mac</family></os>
            </activation>
            <properties>
                <lwjgl.natives>natives-macos</lwjgl.natives>
            </properties>
        </profile>
        <profile>
            <id>lwjgl-natives-windows</id>
            <activation>
                <os><family>windows</family></os>
            </activation>
            <properties>
                <lwjgl.natives>natives-windows</lwjgl.natives>
            </properties>
        </profile>


And here is my module requirements in module-info.java file:
    requires org.lwjgl;
    requires org.lwjgl.opengl;
    requires org.lwjgl.glfw;
    requires org.lwjgl.nanovg;


Am I missing something here?

spasi

Try removing <scope>runtime</scope> from the native artifacts in pom.xml and doing a reimport to update the IntelliJ dependencies. Does that fix it?

Grastasss