Libraries and how you guys use them

This is probably the newbies post I made all day (I make a lot of them) I’d like to know how you guys use libraries in your games because i can’t seem to be able to distribute the game after i get it out of eclipse. I heard jarsplice will do the trick but I would like to have multiple ways on doing this. Also please go into detail on the process because as I can normally get what your talking about sometimes i’m not that lucky.

If you’re using eclipse then you can export as a runnable jar with the libraries packaged inside.

-> Right Click on Project
-> Export
-> Select Destination and launch configuration etc.
-> Make sure “Extract required libraries into generated JAR” is chosen.
-> Finish

If you’re using LWJGL, you’ll need to sort out the natives.
If you want it all in one file, use JarSplice.
If not, the natives need to be in the same directory as the jar file UNLESS you use [icode]System.setProperty(“org.lwjgl.librarypath”, “path/to/natives”);[/icode]

anyways thanks guys i’ll try right away. Thats why i’ve been so afraid of libraries, because i couldnt distribute.

Mentioning a specific member in your posts just to complain about them is pretty immature, just saying.

im not complaining my friend haha, i’m just saying that you have been posting to my posts quite frequently meant no offense of it at all, ill remove your name right now, sincerely sorry

I personally use maven for all my java projects; it integrates reasonably well with Eclipse, but - I believe - is stronger with IDEA and netbeans. Maven isn’t everyone’s cup of tea, but I’m enamored with its ways - besides packaging the project for you, it also manages dependencies and it’s easy to hook in other project-related hooks (post-compilation processing, assembling resources/assets, running tests etc).

I usually deliver a start script to set up the environment. The whole thing is a zip (or installer package) with jars, libs and everything included to run. It’s a bit a kludge with the scripts (need two or three for Windows, Linux and MacOS) but it works.