Sign in to follow this  
BlackSunStudios

Hey guys need a favor here( Slick2d, lwjgl jar packing)

Recommended Posts

Hey guys. I have a game which i am very proud of.
I want to send it to people so they can see it and i want to freely redistribute it also.
The problem i have here is....
How do i make a .jar that uses lwjgl.jar and slick.jar... i have a folder called lib which i put the jars and natives that i use in (apart from the actual game jar)
how do i run the game via .jar that uses external jars?
ive tried fatjar and i get errors about the main class even though ive put the main class.
I really apreciate this because if i get this to work im going to make a web portfolio and put my game on..

info about the game:
it uses import org.newdawn.slick2d.*;
its a clone of powder game but in my version when you heat things they change into different things.


Thanks in advance

Share this post


Link to post
Share on other sites
Have a look at the JarSplice Tool found [url="http://ninjacave.com/jarsplice"]here[/url]

Pretty easy to use:

1) Export your game to a jar from the IDE, just your game class and resources (sounds, images, etc).
2) Run JarSplice
3) On the Jars tab put your jar, slick.jar, lwjgl.jar and any other external jar you use.
4) on the natives tab, add all the lwjgl natives to it.
5) on the main class tab put your main class (including any packages it is in).

That is it, build the fat jar and you should be able to run your game just by clicking the newly created jar.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this