1. Running Java 3D in a browser
This is one of the most frequently asked questions on the list. The instructions below describe the procedure for doing this under Windows. We should have something written up for Unix shortly.
If you're installing this on a system that has never had Java 2/Java 3D installed on it before, download the current Java 2 JRE (1.2.2), Java 3D (Java 3D 1.2 beta 1), and let the installer put them in their
default locations, or at least in the same directory structure
. This is
very important
. If you do not do this, and Java 3D is not installed in the Java 2 directory, it is significantly more complicated to set things up correctly. We do provide instructions below that other people have used to do it this way, in case you really need to do it.
First, Java 3D
requires
Java 2 while communicator only supports Java 1.1. It will never work a plain Communicator setup. You will need to download and install the Java Plugin from
http://java.sun.com/products/plugin/
Make sure the default setup is for Java 2, or download the very latest version of Java 2. The latest version includes the plug-in.
Next, install Java 3D under the Java 2 directory.
Now, you'll need to convert the HTML using the
HTML converter
. This will set up your HTML so that the Java 2 plug-in will automatically be launched when a browser reads the HTML document. If the browser doesn't have the Java 2 plug-in installed, the user will be given the opportunity to install it.
Point your browser at this page, and you should see a Java 3D applet running in your browser. You can
go here to test the HelloUniverse applet
in your browser.
If you've installed and used Java Plugin, but it still complains...
J3D uses native methods which requires the use of special privileges or you loosening the security policy for the java classes (definitely not recommended!).
Rajesh Gupta (rajeshg@gsslco.co.in) has written the follow proceedure that appears to work for everyone that has tried it so far:
Finally was able to make Java3D run inside my browser. Here is
a step by step guide. Maybe there is a simpler or a better way of doing
it, if you know of it, please post it to this list. Please note that this
was done on WinNT4.0. This might slightly vary for other OS's.
1. Download and install JRE 1.2. If you have installed JDK 2, it gives you an
option of installing the JRE also.
2. Download and install Java Plug-in. Download and install Java Plugin html
converter.
3. Point Java Plugin to use the JRE1.2. (invoked through
StartMenu->Programs->JavaPlug-inControlPanel under advanced tab)
4. Install Java3D beta1.
5. Modify your Path and Classpath environment to include Java3D dll's and
Java3D jar's respectively (On NT through
MyComputer->right click->properties->Environment Tab)
6. Run "keytool -genkey" command to generate your keys. The password you
enter here will be needed when signing the jar file.
7. Pack all your class files into a jar file.
8. Sign the jar file. using something like "jarsigner MyJar.jar MyKey"
9. Html file to be changed to pick the class from the class file.
10. Convert Html file using the HTML converter.
11. Open the HTML file in your browser.
That should do it.
If this also doesn't work for you, try
the instructions given by Tim Bray
that were recently posted to the Java 3D mailing list.