Jim Kleckner <[EMAIL PROTECTED]> writes: > My next experiment was to get Java3D working. > I am using Java SDK 1_4_1_01 but found that > the most recent versino of Java3D 1_3 would > silently not work. Downgrading to > Java3D 1_2_1_04 (DirectX) subsequently worked.
Thanks for the feedback. There is a bug with Java3D 1.3 and Ptolemy II 2.0.1. Below is what I did to replicate it: 1. On a Window XP laptop, uninstalled all previous versions of the Java SDK, JRE and Java 3d. 2. Rebooted 3. Installed Java 1.4.1_01 SDK 4. Installed Java 3d 1.3 Direct X. Note that Java 3d 1.3.1-beta is also available. I did not try it this time, but I believe that Java 3d 1.3.1-beta should work if Java 3d 1.3 works. 5. Installed Ptolemy II 2.0.1 by using the Windows installer. 6. Ran the GR demos, the demos run, but nothing but a black window is displayed. I believe I fixed this last October with the following change to ptII/ptolemy/domains/gr/lib/ViewScreen.java *************** *** 265,274 **** while (branches.hasMoreElements()) { BranchGroup branchGroup = (BranchGroup) branches.nextElement(); if (branchGroup.getCapability(BranchGroup.ALLOW_DETACH)) { ! if (!(branchGroup instanceof ! com.sun.j3d.utils.universe.ViewingPlatform)) { ! simpleUniverse.getLocale().removeBranchGraph(branchGroup); ! } } } --- 265,271 ---- while (branches.hasMoreElements()) { BranchGroup branchGroup = (BranchGroup) branches.nextElement(); if (branchGroup.getCapability(BranchGroup.ALLOW_DETACH)) { ! simpleUniverse.getLocale().removeBranchGraph(branchGroup); } } 7. I added the java bin directory to my path 8. Downloaded the source version of Ptolemy II 2.0.1 and recompiled 9. Verified that the bug still occurred. BTW - In the console, I saw the following message: Fail to create hardware D3D Device, switch to use reference rasterizer. - D3DERR_OUTOFVIDEOMEMORY 10. Made the above patch, recompiled ViewScreen.java 11. Ran the GR demos and they worked. > Worth a note on the web site. I created a patched version of ViewScreen.java and also a new version of experimentalDomains.jar for the Windows Installer that include this fix. See the limitations page of http://ptolemy.eecs.berkeley.edu/ptolemyII/ptII2.0/ That page also has a note about the Jini issue. I sprinkled some links about Java 3d around the Ptolemy II 2.0 pages as well. > Just to document it, the Soot people have gotten > their version 1.2.4 to work with JDK 1.4.x. See: > http://www.sable.mcgill.ca/soot/CHANGES > I haven't tried it, yet. With regard to Soot, our development tree works with the new version of Soot that works with Java 1.4.x. Patching the release would be tricky, so this change will have to wait for the next release of Ptolemy II in May. For a little more info about Soot and running Ptolemy II under Java 1.4, see my post from January 11 at http://groups.google.com/groups?dq=&hl=en&lr=&ie=UTF-8&safe=off&frame=right&th=a535b5507d74657d&seekm=200301132036.h0DKaXUu027488%40doppler.eecs.berkeley.edu#link2 > [Chris, got your last message, thanks. I do know how > to reset the configuration and rebuild. I'm intentionally > trying to use current tools to see what breaks.] Thanks, this is a useful exercise, since it points out issues that me might need to address in the devel tree for the next release and it gives me a chance to update the limitations page for the current release. BTW - I recompiled Ptolemy II 2.0.1 from source using Java 1.4.1_01 and Java 3d 1.3 and not get any errors about Jini because Jini was not found when configure was run. The configure output looked like: checking for jini directory... configure: warning: 'Failed to find $PTII/vendors/sun/jini/jini1_0_1/lib/jini-core.jar Perhaps Jini is not installed? You need not download Jini unless you plan on use Jini and JavaSpaces Jini can be downloaded from http://java.sun.com/jini' and placed in $PTII/vendors/sun/jini/jini1_0_1' I agree that we should update or remove the Jini actors for the next release. Thanks again for reporting the GR bug, and let us know if you find other issues. -Christopher ---------------------------------------------------------------------------- Posted to the ptolemy-hackers mailing list. Please send administrative mail for this list to: [EMAIL PROTECTED]