So this may be a newbie question but I'm having a little trouble with JOGL Applets and deployment. I've read over a bunch of other posts and some seem dated and I just don't get others. If someone is willing to help and answer my dumb questions I'd appreciate it.

To start I'm able to get JOGL applets to work in eclipse. Here is a basic class that I'm trying to deploy.

Ok so I updated my files with that new link and I still get nothing. I'm trying to do this on google sites and I figured that may be the problem so I tried to run it on my local machine. But now I get this error

exception: JNLP file error: file:/C:/Users/Stephen/Documents/JAVA/AppletLauncherJogl/AppletLauncherJogl.jnlp. Please make sure the file exists and check if "codebase" and "href" in the JNLP file are correct

when I use these. The html, jnlp, and jar are all in the same directory.

Well I replaced the references with the file references online and I still get nothing. From what I've read I feel like my code is now correct. I'm thinking that it is not possible to host this on google sites. Does anyone have any other suggestions? I'm not too familiar with html and jnlp, but is there a way to debug? If anyone is willing to try to run this code for me I'd appreciate it. Everything is posted above. If it works on something other than google sites I'll just get a domain and storage and then go from there, I just don't want to spend any money until I know it works.

Does it have to be JOGL? I've tried the LWJGL applet system & it works (it's what Minecraft uses). If you need openGL in an applet perhaps LWJGL might be an easier choice?

*disclaimer* No insult or injury to JOGL or any users of JOGL is intended by the author of this post. No debate regarding the relative merits of JOGL to any other java-based openGL implementation will be entered into.

When I print out the toString values of URLS I getfile:C:/.... (Windows 7)this is from URLS passed to a ClassLoader.Currently I havnt had any problems with this style of URL.Also works fine on Mac except without the "C:"just an extra "/"

Does it have to be JOGL? I've tried the LWJGL applet system & it works

I'll look into that, but now I'm curious why I can't get JOGL to work.

Is there something wrong with my actual class and the way I exported the jar file? Am I selecting the main class wrong in my html/jnlp? Those are the only two things I can think of. The way I did this was in Eclipse and just did File->export, the JAVA->Jar file, then in that pop up window all I do is select the project and give it a name, I don't do anything else. Is there something else I'm supposed to do?

Thanks again for all the help.

As far as the local access, I don't really care too much about that, I was just trying something different because I only am using google sites. But thanks for the info anyways. Always good to learn something new.

No you cannot access to the local file system by using simply absolute path or URI, it has to be an URL, you have to use the local loop, a local network interface. I checked it in the documentation of Java Web Start when I wanted to use JNLP to install a game from a CD.

Is there something wrong with my actual class and the way I exported the jar file? Am I selecting the main class wrong in my html/jnlp? Those are the only two things I can think of. The way I did this was in Eclipse and just did File->export, the JAVA->Jar file, then in that pop up window all I do is select the project and give it a name, I don't do anything else. Is there something else I'm supposed to do?

Thanks again for all the help.

I have found what is wrong. You're affected by the bug 411 of JOGL 2, Sven has just fixed it in applets today. Update your JARs and your native libraries (.so, DLL, .jnilib). There is no need of using another OpenGL binding. JOGL 2 is still in beta, sorry, we do what we can.

Thanks a lot, I really appreciate your help. I replaced the files with the new version and that seemed to fixed the problem, at least at first. I'm a little confused by what is going on now. Sometime my applet will load fine, (a little slow but it loads) but other times I get this error. I'm not really sure what could be wrong, but I do know my jnlp doesn't have 100+ lines so I'm thinking it may be with one of the linked files. Any thoughts? This may be something that should be in another thread, so let me know if I should move. Thanks again.

OK, without changing anything from before my applet will work only if is the first thing started when I start up my computer. If I hit refresh or go to another site then return I get an error. It almost seems random but I will get one of these errors.

I'm at a little loss for whats going on because this http://jogamp.org/jogl-demos/www/applettest-jnlp.html always works. I'm thinking I may be doing something wrong in my actually class. Is the source code for the gears demo applet available anywhere? I'd like to try to build that in eclipse, then export and then host it myself to see if I get any errors.

Not really, but I was just proving my point you can use local. You could probably can modify that to support Linux too. Have autorun file for each OS(I'm guessing they are all different) run the correct file.

I'm at a little loss for whats going on because this http://jogamp.org/jogl-demos/www/applettest-jnlp.html always works. I'm thinking I may be doing something wrong in my actually class. Is the source code for the gears demo applet available anywhere? I'd like to try to build that in eclipse, then export and then host it myself to see if I get any errors.

Do you sign all JARs? I think your problem might come from some changes in the latest update of Java.

I'll try, but I am curious, it Jogl something that isn't very well kept up? I mean no offense by this and I have no trouble just making regular programs I just feel like making a Jogl applet has been a royal pain.

I'll try, but I am curious, it Jogl something that isn't very well kept up? I mean no offense by this and I have no trouble just making regular programs I just feel like making a Jogl applet has been a royal pain.

Use JOGL 1.1.1a if JOGL 2 is not stable enough for your needs. JOGL is maintained, look at the GIT repository, it is active. However, the Java Web Start default install and the autobuild really need an update.

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