LWJGL Forum

Programming => General Java Game Development => Topic started by: soxey6 on July 13, 2015, 10:32:12

Title: Natives
Post by: soxey6 on July 13, 2015, 10:32:12
How would I load the natives if they're in the jar?

Just a quick question. I've done some googling and I'm coming up with very vague results and I'm not quite understanding.
Title: Re: Natives
Post by: spasi on July 13, 2015, 12:57:11
If you're talking about the maven artifacts, see the SharedLibraryLoader in this sample project (https://github.com/badlogic/lwjgl3-maven-gradle).
Title: Re: Natives
Post by: soxey6 on July 13, 2015, 13:41:19
No, i dont use maven (yet). I mean how can load the natives if they're inside my jar?
Title: Re: Natives
Post by: spasi on July 13, 2015, 13:45:12
You must extract them first, usually to java.io.tmpdir. Which is exactly what the SharedLibraryLoader does.