2

I am making a game using lwjgl, and am trying to figure out how to export it into a single runnable jar or exe.

I saw that i can use jarsplice to make exe's fairly easily so i followed the instructions,

  1. I exported a jar from eclipse(not a runnable)
  2. Then added that jar, all the jars the game uses, and the natives it needs.
  3. When i try to create an exe in jarsplice, it says error opening zip file.

I am pretty sure that when eclipse makes a jar it packages all the folders in the project into it as zip folders.

So should i have eclipse make a jar with only the classes and not the resource folder, then use that with jarsplice?

And if so where would i have to put that folder and not have it accessible by end users?

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
Ben Marshall
  • 171
  • 2
  • 12
  • Well obviously i don't mean not possible to reach at all, i just mean i want all the files in one single icon, and not have the folders just sitting there, you could just help me out... not antagonize... – Ben Marshall Aug 23 '13 at 02:31

1 Answers1

0

These steps worked for me:

  1. Export as Runnable Jar with Eclipse selecting "Copy required libraries into sub-folder next to generated JAR". This folder is called [jarname]_lib.
  2. Open JarSplice and add the main program jar, and all of the libraries that can be found in the [jarname]_lib.
  3. Add all of the natives for the project, these can be found in the [jarname]_lib/natives folder.
  4. Add the main class location
  5. Export Jar
Benjamin W.
  • 46,058
  • 19
  • 106
  • 116
eandr127
  • 35
  • 5
  • If that doesn't work, maybe you can try running it before putting it through JarSplice. – eandr127 Feb 20 '16 at 00:29
  • If the problem only happens when using Jarsplice, then maybe take a look at this question: http://stackoverflow.com/questions/574809/load-a-resource-contained-in-a-jar – eandr127 Feb 27 '16 at 15:03