LWJGL Forum

Please login or register.

Login with username, password and session length

Author Topic: Using the new nightly Build(3.0.1)  (Read 1044 times)

maxer14

  • Newbie
  • *
  • Offline Offline
  • Posts: 3
Using the new nightly Build(3.0.1)
« on: September 23, 2016, 11:06:09 »

Hello LWJGL users,

After LWJGL throwing an 'Unmatched format specifier '%X' error.
I found out it was actually fixed in the new build here: http://forum.lwjgl.org/index.php?topic=6297.0.

However I haven't found out how to configure it properly in Eclipse.
In the stable and release build it gave me a folder with just the jar and the native files.
But now it gave me a bunch of folders. Having no idea wich one to pick.
I have both tried to add the whole archive to eclipse and extract it and then add lwjgl.jar.

I've tried several tutorials, but none of them show how to install with this kind of 'folders'.



How do I configure this properly in Eclipse?

Kind Regards,

Max
Logged

Kai

  • Nerdus Imperius
  • *****
  • Offline Offline
  • Posts: 925
Re: Using the new nightly Build(3.0.1)
« Reply #1 on: September 23, 2016, 11:31:36 »

It depends on what features/libraries/modules you want to use.
For likely the most common usecase of using GLFW + OpenGL + stb, your classpath needs to include:
- lwjgl/lwjgl.jar
- lwjgl/lwjgl-natives-<your-os>.jar
- lwjgl-glfw/lwjgl-glfw.jar
- lwjgl-glfw/lwjgl-glfw-natives-<your-os>.jar
- lwjgl-opengl/lwjgl-opengl.jar
- lwjgl-stb/lwjgl-stb.jar
- lwjgl-stb/lwjgl-stb-natives-<your-os>.jar
Logged

maxer14

  • Newbie
  • *
  • Offline Offline
  • Posts: 3
Re: Using the new nightly Build(3.0.1)
« Reply #2 on: September 23, 2016, 13:35:05 »

It depends on what features/libraries/modules you want to use.
For likely the most common usecase of using GLFW + OpenGL + stb, your classpath needs to include:
- lwjgl/lwjgl.jar
- lwjgl/lwjgl-natives-<your-os>.jar
- lwjgl-glfw/lwjgl-glfw.jar
- lwjgl-glfw/lwjgl-glfw-natives-<your-os>.jar
- lwjgl-opengl/lwjgl-opengl.jar
- lwjgl-stb/lwjgl-stb.jar
- lwjgl-stb/lwjgl-stb-natives-<your-os>.jar

Hello Kai,

First of all thank you for replying to my question.  :)

In Eclipse I added the libraries you told me to add. It fixed all the warnings in Eclipse about an non-existing import.
However when I actually run the "HelloWorld.java" class that is provided at the Get Started page, it throws the following error:
Code: [Select]
Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class org.lwjgl.system.MemoryAccess
at org.lwjgl.system.Pointer.<clinit>(Pointer.java:22)
at org.lwjgl.system.Platform.mapLibraryNameBundled(Platform.java:76)
at org.lwjgl.glfw.GLFW.<clinit>(GLFW.java:562)
at Game.HelloWorld.run(HelloWorld.java:29)
at Game.HelloWorld.main(HelloWorld.java:105)

NOTE: "</clinit></clinit>" Is not actually part of the exception. It's some sort of a forum bug?

A quick google showed me that this problem is caused by incorrectly configured native libraries.
Since Eclipse asks for a folder instead of a .jar I tried to point to the library folder. I also tried to make seperate folders and put the correct native library for my OS in it. And last I've tried to point it to the .jar. None of them worked.



Kind Regards,

Max
Logged

Kai

  • Nerdus Imperius
  • *****
  • Offline Offline
  • Posts: 925
Re: Using the new nightly Build(3.0.1)
« Reply #3 on: September 23, 2016, 13:54:02 »

It does not look like you added the *-natives-<your-os>.jar files, I mentioned in the list.
Also you don't need to set java.library.path (via the "Native Library Location" in Eclipse).
Logged

maxer14

  • Newbie
  • *
  • Offline Offline
  • Posts: 3
Re: Using the new nightly Build(3.0.1)
« Reply #4 on: September 23, 2016, 15:54:30 »

It does not look like you added the *-natives-<your-os>.jar files, I mentioned in the list.
Also you don't need to set java.library.path (via the "Native Library Location" in Eclipse).

Yes! It worked ;D
Thank you so much.

I thought I had to set the "Native Library Location".
After adding them as a seperate library the problem was solved :)

Kind Regards,

Max
Logged