Distributing Your LWJGL Application

From LWJGL

Revision as of 20:42, 1 March 2012 by Matzon (Talk | contribs)
Jump to: navigation, search

Distributing your LWJGL Application

There are 2 ways to distribute your application, either as a desktop (standalone) window or as an applet in a browser.


For instructions on how to deploy it as an applet, visit this wiki.


There are many ways to deploy to the desktop:

Manifest-Version: 1.0
Main-Class: full.name.of.MainClass
Class-Path: lwjgl.jar libs/AnotherJarFile.jar

Class-Path is a space separated list of JAR files. Don't forget to leave an empty line at the end.


To create a batch file for Windows or a shell script for Unix, it should look like so:

java -Djava.library.path="natives/" -jar MyJar.jar

To use the hidden switch, this should be the first call in your main method:

System.setProperty("org.lwjgl.librarypath",System.getProperty("user.dir") + "/natives/");

You will still have to setup the classpath like in previous option for both ways.








-ra4king

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox