Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (538)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (600)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Java Game APIs & Engines / JOGL Development / Re: How to: Getting started with JOGL on: 2007-06-01 16:49:34
This is a desperate plea. I have a VERY SIMPLE request:

Please pin a topic explaining the options and caveats for deploying JOGL apps. Failing that, please respond as to why this won't happen. It would be greatly appreciated by many people.

The more detailed issue follows. Note how I'm giving a pretty good outline of the proposed HOWTO, sans the definitive answers...

Having searched around high and low, I have seen many explanations as to how to deploy JOGL apps. The majority consensus seems to be to use Java Web Start. In some places I've seen it recommended that the JOGL libraries (both JAR files and platform-specific native pieces) be added to the JRE's standard extension directory; in other places I have seen dire warnings not to do this (with sketchy explanations given as to why not). The latter recommend either JWS or setting the system-wide CLASSPATH and platform-specific library path environment variables. I have also seen mention of a method to use JOGL in applets, but have not yet tried to do this myself.

Here are some problems with these suggestions:

1. In many situations, Java Web Start is not desirable. To name a few: you have a ginormous app you want to distribute on a CD or other media that uses JOGL; you want users to be able to run the app as a locally installed, offline application, since it has nothing to do with the internet; you are really lazy and don't want to investigate the poorly documented JWS setup and write a big XML file; you don't have access to a static web server host; you are using JOGL in an app containing other libraries that can not be deployed this way. I think I've made my point on this.

2. Setting the CLASSPATH and PATH does not appear to work. At least didn't work for me. (JOGL 1.1.0, JRE 1.5.0_9, Windows XP) I cannot for the life of me think why it wouldn't work, but it does not. I tried rebooting; nothing. I set both these variables to the location containing all the JOGL libraries (JARs and .DLLs). As I've seen documented. When I try to execute my simple JOGL app, either by double-clicking the JAR file or doing java -jar testapp.jar from the command line, I get an error. (In double-click case this error erroneously tells me that main class could not be found; by putting JOGL libraries into the JRE's extension directory, the app runs just fine, indicating that in fact the main class is easy to find, and is specified correctly in the jar manifest, but this would seem to be a JRE issue.)

3. I can run by test app by giving a full java -classpath ".;%CLASSPATH%;C:\jogl\jogl.jar;C:\jogl\gluegen.jar" -jar testapp.jar . However this is a pain in the ass, and the whole point here is I am trying to allow end users to run this app. For that matter, even setting the system-wide CLASSPATH and PATH variables (or LD_LIBRARY_PATH on Linux, whatever it is on OS X) is not something users are going to do for the most part. (For development its also simple to let my IDE add the JARs to the build path and test within the IDE.)

3. Because of 1,2, and 3, I appear to be left with no options but to copy the JOGL libraries into my JRE's lib/ext directory. Though this is discouraged with dire warnings, it works just fine for me so far. As for these dire warnings, I do understand that this method will break whenever the JRE is updated to another version (again, a JRE issue; IMHO it ought to be smart enough to keep already installed extensions when updating, or allow users to choose this option). I have also been warned that this causes a conflict when other apps using Java Web Start but using a different (or even same?) version of JOGL are loaded. So that's no good...

4. When I've tried to have a couple friends test my app, they have had failures I cannot explain. One, also using Windows XP, was unable to get the app to run correctly when double-clicking even after placing the JOGL libraries in the JRE's extension directory. She was able to run from the command-line though, doing java -jar testapp.jar, with the libraries in the extension dir. This mystifies me, as I am able to double-click the jar file. Another friend on OS X who out of paranoia has so far refused to place the libraries into the extension dir has had errors even when invoking from the command-line with the full classpath to the libraries specified, that he solved only by moving to the same directory as my app before invoking. The point is, it has been a pain in the ass to tell other users how to run the app.

5. So based on these points, it appears there is *no* reliable way to run JOGL apps, other than Java Web Start (see point #1). Correct me if I'm wrong, but isn't deploying an app likely to be something *all* developers will want to do at some point? It seems there ought to be a simple way to allow users to have the same experience with a Java app (3D or otherwise) as with any other application. I am not averse to using an installer package like InstallAnywhere, or even writing my own batch and shell files for different target platforms so users can double-click something, but as this post details, I'm not sure where the JOGL stuff ought to be installed or what those scripts ought to contain.

I hope the detail here is helpful and not aggravating and that it is appreciated that the need for solid answers to these issues in a highly visible place is important to all potential JOGL users and developers. If such a resource exists, by all means point me to it and I will apologize for being redundant (but please pin it on these forums).

Thanks.

Jason Boyd

 


2  Discussions / Miscellaneous Topics / Forum registration acting very weird on: 2007-06-01 16:17:09
Just FYI, I tried many times to deal with the messed up captcha setup on the registration page, finally resorting to using IE, which on the second attempt finally worked. The letters I was supposed to type were mangled so that only 3 or 4 of the 5 were appearing, with superfluous text in between them (the text saying "Type the letters shown" appeared duplicated). In other words, I could not see the full captcha letters.

 Firefox 2.0 always duplicated; IE 7 like I say on second attempt to load letters displayed all 5.
Pages: [1]
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

rwatson462 (28 views)
2014-12-15 09:26:44

Mr.CodeIt (19 views)
2014-12-14 19:50:38

BurntPizza (37 views)
2014-12-09 22:41:13

BurntPizza (72 views)
2014-12-08 04:46:31

JscottyBieshaar (34 views)
2014-12-05 12:39:02

SHC (46 views)
2014-12-03 16:27:13

CopyableCougar4 (42 views)
2014-11-29 21:32:03

toopeicgaming1999 (110 views)
2014-11-26 15:22:04

toopeicgaming1999 (96 views)
2014-11-26 15:20:36

toopeicgaming1999 (29 views)
2014-11-26 15:20:08
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!