Hello,
I need to setup the natives for the LWJGL in the code… How can I do that?
I’m not going to use the LWJGL but the Paulscode SoundSystem needs it so I have to setup the native stuff…
Hello,
I need to setup the natives for the LWJGL in the code… How can I do that?
I’m not going to use the LWJGL but the Paulscode SoundSystem needs it so I have to setup the native stuff…
Easy. If you run eclipse, just right click the project–>Properties–>Java Build Path–>Libraries–>Lwjgl–>Natives
And then set the native to LwjglFolder–>natives–>[Your operating System]. DONE! Must do this with all projects you use lwjgl with.
He asked “in code” not in eclipse.
String system = System.getProperty("os.name");
if (system.contains("Windows")) {
System.setProperty("org.lwjgl.librarypath", new File("Windows").getAbsolutePath());
}
else if (system.contains("Mac")) {
System.setProperty("org.lwjgl.librarypath", new File("Mac").getAbsolutePath());
}
else if (system.contains("Linux")) {
System.setProperty("org.lwjgl.librarypath", new File("Linux").getAbsolutePath());
}
else if (system.contains("Solaris")) {
System.setProperty("org.lwjgl.librarypath", new File("Solaris").getAbsolutePath());
}
Assuming that you have natives as folders “Windows”, “Mac” etc. in program main directory.
Thanks I needed this too. Will try.
Paulscode SoundSystem has several backends and one of them uses OpenAL through LWJGL, which is not exactly what you meant. Sorry for this “off topic”.