|java.library.path work around [message #754139]
||Tue, 01 November 2011 02:12
Registered: November 2011
Hey guys, my question is really simple and i've spent several hours trying to search the solution for my problem and can't find it anywhere, so i decided to ask here.|
The thing is, i'm using lwjgl lib in eclipse, i've set it all ok and i can run the project without any problems. The problem comes when i export the JAR. Since lwjgl requires the natives libraries i have to run java with -Djava.library.path set, and that's the problem, i don't want to run it like that, i just want to run the JAR without having to tell java where the natives are every time.
I basicly want to make my JAR as portable as possible, making it simple for the end-user to run it.
I'm on Ubuntu with Eclipse 3.5.2
I've created a folder names lib, added the folder to the build path.
Added the linux natives to that folder.
Added jwjgl.jar and slick.jar to lib and added both to the build path.
In the Libraries tab edit the lwjgl.jar Native library location to point to the lib folder.
For a better understanding i leave a couple of images showing what i've got.
EDIT: btw, i know i can set the JVM commands in eclipse, but i've read it's not a good idea? Searching for something cleaner.
(Size: 17.76KB, Downloaded 230 times)
(Size: 27.43KB, Downloaded 225 times)
[Updated on: Tue, 01 November 2011 02:16]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.02535 seconds