Jump to content
  • Advertisement
Sign in to follow this  

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

This topic is 2939 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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 here

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
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!