How to make my JOGL application start with Java Webstart

Hello! This is my first post here, and I hope I get to stay and help, as well as receive help here for some good time.

I have been studying Java OpenGL for about a few month now, and I have made project that I run on my windows machine. I compile it into a jar, and inside my main method i have line: “System.load( System.getProperty( “user.dir” ) + “/jogl.dll” );”. Of course I put the jogl.dll into same folder as my jar.

What I am wondering is how can I make my application run from Java WebStart? I know i have to make a JNLP file for it, but I am not sure how.

My question is, can anybody post a tutorial for using Java Webstart to load JOGL application jar from my own webhost, but load native libraries from some other place, as well as make sure it would run on linux, windows, mac, etc. How would I have to change my own program, and what a simple example of such JNLP file might be?

I was unable to find clear tutorials on this on the web, so I am hoping one of you guys can help me out with this.

Thank you very much in advance!

Welcome
Did you have a look at:
https://jogl.dev.java.net/nonav/source/browse/checkout/jogl/doc/userguide/index.html?rev=HEAD&content-type=text/html
Has a little bit on integrating jogl

so I make JNLP file to load my Jar from somewhere, but what do I need to do in my main method to load the native library? Do i do nothing? Or is there something special I need to do?

i tried to follow this, and work off Chris Campbell’s JNLP and now i get this:



Starting....
Exception in thread "Thread-14" java.lang.ExceptionInInitializerError
	at javax.media.opengl.GLCanvas.<clinit>(GLCanvas.java:63)
	at edu.ohiou.cs456_badabing.sceneapi.JavaDia.run(JavaDia.java:174)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission jogl.verbose read)
	at java.security.AccessControlContext.checkPermission(Unknown Source)
	at java.security.AccessController.checkPermission(Unknown Source)
	at java.lang.SecurityManager.checkPermission(Unknown Source)
	at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
	at java.lang.System.getProperty(Unknown Source)
	at com.sun.opengl.impl.Debug$2.run(Debug.java:75)
	at java.security.AccessController.doPrivileged(Native Method)
	at com.sun.opengl.impl.Debug.isPropertyDefined(Debug.java:73)
	at com.sun.opengl.impl.Debug.<clinit>(Debug.java:52)
	... 3 more


I followed this guys advise : http://forum.worldwindcentral.com/showthread.php?t=19005

and compiled my project with those 2 jars. Now i get this:


#### Java Web Start Error:
#### Could not verify signing in resource: http://giga2.cs.ohiou.edu/~neiman/jstart/hyper_cube.jar

and exception


java.lang.SecurityException: no manifiest section for signature file entry com/sun/gluegen/runtime/NativeLibrary$1.class
	at sun.security.util.SignatureFileVerifier.verifySection(Unknown Source)
	at sun.security.util.SignatureFileVerifier.processImpl(Unknown Source)
	at sun.security.util.SignatureFileVerifier.process(Unknown Source)
	at java.util.jar.JarVerifier.processEntry(Unknown Source)
	at java.util.jar.JarVerifier.update(Unknown Source)
	at java.util.jar.JarFile.initializeVerifier(Unknown Source)
	at java.util.jar.JarFile.getInputStream(Unknown Source)
	at com.sun.deploy.cache.CacheEntry.writeManifest(Unknown Source)
	at com.sun.deploy.cache.CacheEntry.writeFileToDisk(Unknown Source)
	at com.sun.deploy.cache.Cache.downloadResourceToCache(Unknown Source)
	at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
	at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
	at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
	at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
	at com.sun.deploy.net.DownloadEngine.getResource(Unknown Source)
	at com.sun.javaws.LaunchDownload.downloadJarFiles(Unknown Source)
	at com.sun.javaws.LaunchDownload.downloadEagerorAll(Unknown Source)
	at com.sun.javaws.Launcher.downloadResources(Unknown Source)
	at com.sun.javaws.Launcher.prepareLaunchFile(Unknown Source)
	at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
	at com.sun.javaws.Launcher.launch(Unknown Source)
	at com.sun.javaws.Main.launchApp(Unknown Source)
	at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
	at com.sun.javaws.Main$1.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

so something is wrong with those 2 jars? What should I use to make my application to correctly start through WebStart?

Make sure the jars are signed.
All jars have to have the same signage unless you use the extension code.

ok i signed it, but i am still getting same exception that I have posted before. what is going on with that?

shameless bump. Can anyone help me advise on this? I am still getting that exception on both windows and Mac OS leopard.

When you deploy JOGL and the GlueGen runtime jars you need to use the ones in the -webstart archives which you can find in the Downloads and Files section for the most recently available build from both projects’ home pages on java.net. These are the signed jars for deployment.

Thank you so much! This really helped as it fixed the problem :slight_smile: