Can't retrieve version info for javax.media.opengl.GL

I’m trying to retrieve the version info with the code below for an application that will be run via java webstart.

try
{
Package p = Class.forName(“javax.media.opengl.GL”).getPackage();
if (p == null)
{
System.out.println(“WARNING: Package.getPackage()is null”);
}
else
{
System.out.println(“SPEC=”+p.getSpecificationTitle());
System.out.println(“VER=”+p.getImplementationVersion());
System.out.println(“VENDOR=”+p.getImplementationVendor());
}
}
catch(Exception ex)
{
ex.printStackTrace();
}

However I get null for the SPEC, VER and VENDOR of the returned package. Now my jnlp file includes a jogl.jnlp file which has all the jogl stuff and mean I don’t have to sign the jogl classes. It used to work when I would reference the jnlp file as a file://…, Once I placed everything on a web server and used http://// as codebase etc, this part fails. Any ideas what I could be doing wrong.

Did you extract and re-jar jogl.jar? You must not do that if you want to retain Sun’s signature. Additionally, if you do that you must be careful to preserve the Manifest if you want the version information to be preserved.

I just tried running the demos.misc.VersionInfo demo via Java Web Start against the latest JOGL build (jsr-231-beta4) and it works fine.

No I did not re-jar anything. I included the jogl jars as a extension in my jnlp. It works fine when I specify the codebase as file://, but when I load it onto a web server and have the codebase as http:// when it dosen’t work.

Something is wrong with your test case or JNLP file. This one which invokes demos.misc.VersionInfo from the jogl-demos workspace works fine (enable the Java Console to see the output; you’ll need to kill the java process manually afterward).

This is my console output with mustang b80:

Java Web Start 1.6.0-beta2
Using JRE version 1.6.0-beta2 Java HotSpot™ Client VM
User home directory = /home/grass

c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
m: print memory usage
o: trigger logging
p: reload proxy configuration
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
0-5: set trace level to

package javax.media.opengl
Specification Title = null
Specification Vendor = null
Specification Version = null
Implementation Vendor = null
Implementation Version = null

Sorry. Thank you for posting this more complete information. This in fact is a regression in Mustang build 77, I would guess in Java Web Start. I have filed bug 6418457 to track it. It should show up on the Bug Database on java.sun.com tomorrow.