I wanted to try out the new LWJGL 3 which is currently in kind of a “beta”-state. Embarrassingly I can’t even get the HelloWorld example (http://www.lwjgl.org/guide) to run.
package org.lwjgl.glfw does not exist
is all I get.
I added the lwjgl.jar and disruptor.jar to my module dependencies, but I guess I’m missing something about the natives here. I tried adding them as a lib, as a module (which tells me it’s an empty library although there are two .so files in there oO)
I tried setting the -Djava.library.path of course, no success here:
-Djava.library.path=home/teolha/lwjgl-test/lib/natives/linux/x64
I tried invalidating caches, adding it as system lib and about everything I know. Still, the glfw package can’t be found.
I’m not sure what I’m doing wrong, but I’ve never done this in IntelliJ 14, neither with lwjgl 3, so maybe something has completely changed here?
Any help appreciated!
Advertisement
Answer
So, well, the error wasn’t on my side.
LWJGL 3 is under heavy development currently and the latest stable version wouldn’t match the example, thus I had to use the latest nightly.
(The api changed significantly)
My solution is:
Add the jars as libs and add the .so files as lib as well. That way you don’t need to specify a library path argument 🙂
Works like a charm with the new lwjgl-api!