Java Web Start and Java 3D

Has anybody ever got a Java 3D 1.3 and Java 2 SE 1.4.1 application to start through Java Web Start? I have found articles on this subject, but none seem to work under Linux. I am trying to convert the simple HelloUniverse sample to work under JWS but I get a very strange exception about a class it cannot find:

sun.awt.DrawingSurface

The strange thing is, when I start the application in stand-alone mode with the -verbose option, this class is NEVER loaded. Even weirder, Sun’s bug database states this class does not even exist anymore in JDK 1.4.1. The class is probably used from within the Canvas3D class, but I don’t seem to understand what’s going on.

Any hints?

I cannot give you a true hint - I just can say we successfully (and even without any problem) started Java3D apps with Webstart and the version you say.
Not sure if we tried on Linux…

We require to have Java3D installed upfront. With older versions, we also had the Java3D stuff d’loaded via Webstart. But this only in an internal, non-public test environment, for I’m not sure about legal issues on that approach.

For Linux is a bit complicated … are you sure that on the target machine there isn’t an ancient Java3D installation prior in the path/CLASSPATH/LD_LIBRARY_PATH?

Just wanted to notify everybody here that I have succeeded in web starting J3D both under Linux and Windows.

The only issue I cannot resolve is how to let JWS detect if the target windows machine supports the OpenGL or Direct3D version of J3D. I am assuming it’s impossible to do this, but if anybody knows a way?!

Furthermore, there is the legal issue of distributing (parts of) J3D.

Finally, is there a way to detect if J3D is already installed as a standard extension? Currently, the JWS application will download a copy of J3D regardless of the fact that it might already be installed.

Edit out after re-reading the issue.

-Chris

  • Bumping * from the dead.

So I am trying to deploy my java3d app via jws. The GUI portion of my game runs fine (w/ all the images displaying properly) using JWS. But when I go to load the j3d, I get an exception. This is caused by the loader not finding a texture. Note, the loader finds the 3d file ok (I’m using vrml). It craps out when it gets to the url in the file for the texture. I am already using getResource() method to get the URL (when i give the loader the file name); however, the loader that I’m using (vrml97.jar) can’t find the url to the texture — I’ve noticed this in the exceptions that are thrown.

Any hints to what I should do for loading textures with vrml files?

Thanks

Ok, so I have it working part way. Here is what I did.
Instead of using the old vrml97.jar, I switched loaders to the updated version of this provided here.
Now I can load textures that are in the same directory as the vrml file.

Now for the part that I can’t get to work: relative paths

Example:


models/test.wrl
textures/texture.jpg

Now in test.wrl there is an element called texture and it has a url attribute
if I do this


texture ImageTexture { url ".../textures/texture.jpg" }

Then I get an exception when loading this with Java Web Start; however, this works fine running the application without jws.
If I were to copy the texture.jpg into models/. and set url=“texture.jpg” then it works.

I really really don’t want to do this b/c it will make the whole model and texture directory structure look ugly.

Any thoughts?