AlbertGarde
AlbertGarde

Reputation: 409

Creating a .jar file of a project that uses lwjgl

I am using eclipse v.4.2.2 and I am trying to create an executable .jar file of my project.
I have tried simply using the export option, but when I do it shows an error because it cannot find openGL. I did check the box that says "Extract required libraries into generated JAR".
What am I doing wrong or what am I not doing?

Upvotes: 1

Views: 495

Answers (1)

Maarten
Maarten

Reputation: 663

I suggest using JarSplice it's really simple and efficient.

.First export your lwjgl project as a regular jar using eclipse.

.Second use JarSplice and add all the necessary jar's.(Your game, and all the used libraries).

.Third add the needed natives.

.Fourth add the main class path which would be something like example.main.MainClassdepending on your package hierarchy.

.Fifth create a fat jar.

.(Optional) Create an Windows .exe, a Linux .sh, or a Mac .app

I hope this helps.

Upvotes: 1

Related Questions