LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: BrickFarmer on February 02, 2018, 08:41:50

Title: Distributing Apps
Post by: BrickFarmer on February 02, 2018, 08:41:50
Any tips on deploying demos / completed projects?  Not that I have one yet :)  I saw some stuff on the wiki but it seems a bit dated. 

option 1:  Browser.  Nearly everything java based in the browser seems dead, applets/webstart, scary popups/certs.

option 2:  JAR.  A runnable jar isn't very user friendly and depends on having an installed JRE.  Something that is no longer standard, at least on MacOS.

option 3:  Native.  Building natives with a bundled JRE?  Probably the best option, but there don't seems to be any OS Cross Platform tools around now to even do this?

option 4: Native Wrapper: Small windows / mac natives that download jars from AWS S3 or something similar (like what minecraft does).

Any other ideas?  I dont suppose there are plans for an LWJGL client 'app store' :) or are we better targeting something like Steam with option 3?  If so do we have a way to create natives with all the LWJGL3 jars all bundled up as well?
Title: Re: Distributing Apps
Post by: spasi on February 02, 2018, 12:44:49
Starting with Java 9, you also have the option to use jlink (https://docs.oracle.com/javase/9/tools/jlink.htm), which LWJGL supports (your app and all dependencies must be modular). It's more appropriate for server applications though.

For client deployment, there's Self-Contained Application Packaging (https://docs.oracle.com/javase/8/docs/technotes/guides/deploy/self-contained-packaging.html), but I haven't tried it lately. Native runners/installers with embedded JREs are usually the best solution. You can roll your own or use something like packr (https://github.com/libgdx/packr) or Launch4j (http://launch4j.sourceforge.net/).

Quote from: BrickFarmer on February 02, 2018, 08:41:50I dont suppose there are plans for an LWJGL client 'app store'

Nope, that's outside the scope of LWJGL.
Title: Re: Distributing Apps
Post by: vikaskundu on March 18, 2018, 12:47:49
Quote from: spasi on February 02, 2018, 12:44:49
Starting with Java 9, you also have the option to use jlink (https://docs.oracle.com/javase/9/tools/jlink.htm), which LWJGL supports (your app and all dependencies must be modular). It's more appropriate for server applications though.

For client deployment, there's Self-Contained Application Packaging (https://docs.oracle.com/javase/8/docs/technotes/guides/deploy/self-contained-packaging.html), but I haven't tried it lately. Native runners/installers with embedded JREs are usually the best solution. You can roll your own or use something like packr (https://github.com/libgdx/packr) or Launch4j (http://launch4j.sourceforge.net/).

Quote from: BrickFarmer on February 02, 2018, 08:41:50I dont suppose there are plans for an LWJGL client 'app store'

Nope, that's outside the scope of LWJGL.

Understood! Thank you for the response @spasi :)