Slick Forums
http://slick.ninjacave.com/forum/

[IDEA] JAR Packaging tool/tut
http://slick.ninjacave.com/forum/viewtopic.php?f=27&t=4763
Page 1 of 1

Author:  liamzebedee [ Wed Mar 28, 2012 7:30 am ]
Post subject:  [IDEA] JAR Packaging tool/tut

Ok so after seeing the incredibly large number of posts about packaging executable JARS, I think we should have a tool packaged with Slick (e.g. Pedigree Particle Editor) that can do these things. Or a tutorial.

Author:  R.D. [ Wed Mar 28, 2012 8:03 am ]
Post subject:  Re: [IDEA] JAR Packaging tool/tut

No I don't think so. Most people are just lazy and don't even try :D

It's all like:
Eclipse -> Export - > Runnable Jar

on main method add:
Code:
System.setProperty("org.lwjgl.librarypath", new File(new File(System.getProperty("user.dir"), "native"), LWJGLUtil.getPlatformName()).getAbsolutePath());
System.setProperty("net.java.games.input.librarypath", System.getProperty("org.lwjgl.librarypath"));


And put a the native folder next to the jar = runs.

And if people are don't want to do that, there is also JarSplice or the FatJar creator (forgot the name).

Author:  Nitram [ Wed Mar 28, 2012 8:59 am ]
Post subject:  Re: [IDEA] JAR Packaging tool/tut

You even can create such jar files using ant. Simply by:

Code:
      <!--Build jar file-->
      <jar jarfile="target.jar" basedir="classes" includes="**">
         <manifest>
            <attribute name="Main-Class" value="your.runnable.class" />
         </manifest>
      </jar>


Nitram

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/