![]() |
| Using J3D in IDEs
Return to the main FAQ page for more questions and answers.
There are no currently known Eclipse plugin variants of Java3D. It should be relatively easy to add this capability. However, note that Java3D is heavily dependent on AWT. Eclipse does support mixing AWT and SWT, but on MacOSX there are some critical issues with this (ie locks the computer solid due to event models between Carbon and Cocoa clashing).
2.
Symantec Visual Cafe
Symantec Visual Cafe Professional 3.0a can debug Java 3D applications. This note describes what I did to get it working. Installation Locations The steps below assume that Java is installed in the following directories.
c:/JavaSoft/JRE/1.2/bin/...
c:/JavaSoft/JRE/1.2/lib/...
c:/JavaSoft/jdk1.2.1/bin/...
c:/JavaSoft/jdk1.2.1/jre/...
c:/JavaSoft/jdk1.2.1/lib/...
Note that the JRE hierarchy contains both JRE 2 and the J3D runtime. Similarly, the JDK hierarchy contains both JDK 1.2.1 and the J3D SDK. PATH Environment Variable My PATH is as follows. It is important that the JDK bin directory appear before the NT system32 directory, which probably contains some (half crippled) java.exe file.
c:/JavaSoft/jdk1.2.1/bin
c:/WINNT/system32
c:/WINNT
c:/VisualCafe/bin
c:/VisualCafe/Java/bin
CLASSPATH Environment Variable My CLASSPATH is pretty minimal. Everything that properly belongs in the JRE lib/ext folder will be found there automatically by the JVM. (Cafe will need to be told explicitly where to locate those other jars, but not through CLASSPATH.) My CLASSPATH therefore only contains directories specific to my application; for this example, assume it to be unset. This is probably a good point to try J3D HelloUniverse. Configuring Cafe Project Options Under Project Options, Directories tab, the directory list for "Input class files" needs to contain the following directories:
d:\JavaSoft\jdk1.2.1\jre\lib
d:\JavaSoft\jdk1.2.1\jre\lib\ext
Configuring Cafe Environment Options This is the important part. You must define a new VM to plug into Cafe. First, look at the Cafe readme (e.g. c:/VisualCafe/ReadMe.html), under the topic "Enhanced Pluggable VM Debugging Support for 3.0a". I've defined a VM called JDK 1.2.1, as follows:
Compiler classpath {see below}
Use VM executable D:/JavaSoft/jdk1.2.1/bin/java.exe
Classpath specifier -classpath
Classpath {see below}
Other command options {empty}
VM path D:/JavaSoft/jdk1.2.1/bin/
Use debugger executable {empty}
Javadoc executable {empty}
The entries for "Compiler classpath" and "Classpath" are identical. Jar files to include in searchpaths for the compiler, VM and debugger:
c:/JavaSoft/jdk1.2.1/lib/dt.jar
c:/JavaSoft/jdk1.2.1/lib/tools.jar
c:/JavaSoft/jdk1.2.1/jre/lib/i18n.jar
c:/JavaSoft/jdk1.2.1/jre/lib/jaws.jar
c:/JavaSoft/jdk1.2.1/jre/lib/rt.jar
c:/JavaSoft/jdk1.2.1/jre/lib/ext/iiimp.jar
c:/JavaSoft/jdk1.2.1/jre/lib/ext/j3daudio.jar
c:/JavaSoft/jdk1.2.1/jre/lib/ext/j3dcore.jar
c:/JavaSoft/jdk1.2.1/jre/lib/ext/j3dutils.jar
c:/JavaSoft/jdk1.2.1/jre/lib/ext/vecmath.jar
plus the Visual Cafe jars. The total Cafe JDK 1.2.1 classpath is this: .; c:\JavaSoft\jdk1.2.1\lib\dt.jar; c:\JavaSoft\jdk1.2.1\lib\tools.jar; c:\JavaSoft\jdk1.2.1\jre\lib\i18n.jar; c:\JavaSoft\jdk1.2.1\jre\lib\jaws.jar; c:\JavaSoft\jdk1.2.1\jre\lib\rt.jar; c:\JavaSoft\jdk1.2.1\jre\lib\ext\iiimp.jar; c:\JavaSoft\jdk1.2.1\jre\lib\ext\j3daudio.jar; c:\JavaSoft\jdk1.2.1\jre\lib\ext\j3dcore.jar; c:\JavaSoft\jdk1.2.1\jre\lib\ext\j3dutils.jar; c:\JavaSoft\jdk1.2.1\jre\lib\ext\vecmath.jar; C:\VisualCafe\JAVA\LIB; C:\VisualCafe\JAVA\LIB\SYMCLASS.ZIP; C:\VisualCafe\JFC\SWINGALL.JAR; C:\VisualCafe\Bin\COMPONENTS\SFC.JAR; C:\VisualCafe\Bin\COMPONENTS\SYMBEANS.JAR; C:\VisualCafe\JAVA\LIB\Collections.zip; C:\VisualCafe\JAVA\LIB\icebrowserbean.jar; C:\VisualCafe\JAVA\LIB\jsdk.jar; C:\VisualCafe\JAVA\LIB\SYMTOOLS.JAR If you shutdown Cafe and restart it, it may parse everything in the classpath and place a .vep file in your JDK bin directory. This is normal and expected. Enrique Dumas adds: Visual Cafe 4.1 the only things needing to be modified after the install is to configure the internal virtual machine to set j3d jar path needed by VC (in jre/ext/lib)
Firstly you need to register the JARs as libraries so that the system can find them. Under the Tools menu item there is an option Configure Libraries. In that you will have to create new library. When you are creating a new library for Java3d you will have to give the path of following files vecmath.jar j3daudio.jar j3dcore.jar j3dutils.jar These can be found in the directory $jbuilder.home/java/jre/lib/ext. If they are not there, make sure that you choose the $jbuilder.home directory when you install Java 3D. Or, if you know what you are doing, copy them there from the standard JDK install place. As they are standard extensions, the JAR files must also be under the JBuilder JRE area in order to run when you try to run the debugger within the IDE. Now, to use that library in your particular project go to Project | Properties dialog. There under Required Libraries, you have to add the Java3D library that you created earlier.
4. Visual J++
Go to the menu item project->properties->classpath
If you have installed the J3D core libraries under the
c:\jdk12\jre\lib\ext\j3dcore.jar c:\jdk12\jre\lib\ext\j3dutils.jar c:\jdk12\jre\lib\ext\j3daudio.jar c:\jdk12\jre\lib\ext\vectmath.jar j3d.org also maintains a page on how to modify J++ to use the Sun JVM that may be of interested to you.
5. IBM Visual Age
This tip applies to VAJ v3.5 working with Java3D (don't know if it will work with any others):
After this you will be able to develop and compile Java3D programs without any problems. However, if you want to run your programs inside the VAJ, you should remember one tip: Never resize Canvas3D, or less VAJ will hang. And don't forget to remove the second call to setSize() in the main() method pregenerated by VAJ. This last call takes place after the Canvas3D has been made visible!
Kawa 3.51 works straight out of the box with no extra configuration necessary.
7. JCreator
Configure -> Options
8. Forte
Open forte
9. Eclipse
10. TogetherJ 5.0+
Netbeans has a plugin that will do the integration for you. It can be found at java3d.netbeans.org. Not only will it support Java3D, it also allows dynamic visuallisation of your scene graph as you are creating it. Requires J3D 1.3 to run though.
|
|
[ j3d.org Home ]
[ Java OpenGL ]
[ Aviatrix3D ]
[ Tutorials ]
[ Books ]
[ Contact Us ]
Hosted by Yumetech, Inc Last Updated: $Date: 2006/04/18 18:19:59 $ |