Recent Changes - Search:

edit SideBar

Java3D

Summary: Java 3D does not work well under Mac OS X. The solution is to Install Java 3D for Mac and Ptolemy

Install Java 3D for Mac and Ptolemy II (JDK10)

Running Java 3D under JDK 10 under macOS has various problems.

See http://forum.jogamp.org/Crash-on-Macos-using-Java-9-td4038267.html for a description of a possible solution.

The files in $PTII/vendors/j3d were copied from http://show.docjava.com/book/cgij/code/jnlp/libs/jogl/:

mkdir -p $PTII/vendors/j3d/lib
cd $PTI/vendors/j3d/lib
wget http://show.docjava.com/book/cgij/code/jnlp/libs/jogl/j3dcore.jar
wget http://show.docjava.com/book/cgij/code/jnlp/libs/jogl/j3dutils.jar
wget http://show.docjava.com/book/cgij/code/jnlp/libs/jogl/vecmath.jar

The files in $PTII/vendors/jogl were copied from http://show.docjava.com/book/cgij/code/jnlp/libs/jogl/:

mkdir -p $PTII/vendors/jogl/lib
cd $PTI/vendors/jogl/lib
wget http://show.docjava.com/book/cgij/code/jnlp/libs/jogl/jogamp-fat.jar

mkdir natives
wget -m -np http://show.docjava.com/book/cgij/code/jnlp/libs/jogl/natives/macosx-universal
mv show.docjava.com/book/cgij/code/jnlp/libs/jogl/natives/macosx-universal/ natives

NPE under Travis

In June 2019, under Travis, Xvfb changed and needed to be started a different way. As part of this, $PTII/.travis.yml was modified to use the Xenial distribution, which defaults to OpenJDK 10. After these changes, we started seeing NPEs while exporting models that used Java3D:

java.lang.NullPointerException
        at javax.media.j3d.JoglPipeline.getGraphicsConfig(JoglPipeline.java:8507)
        at javax.media.j3d.Canvas3D.getGraphicsConfig(Canvas3D.java:953)
        at javax.media.j3d.Canvas3D.<init>(Canvas3D.java:1025)
        at javax.media.j3d.Canvas3D.<init>(Canvas3D.java:986)
        at ptolemy.domains.gr.lib.ViewScreen3D._createViewScreen(ViewScreen3D.java:548)
        at ptolemy.domains.gr.lib.ViewScreen3D.initialize(ViewScreen3D.java:291)

Building Java3d in July 2019

git clone https://github.com/hharrison/java3d-core.git
git clone https://github.com/hharrison/java3d-utils.git
git clone https://github.com/hharrison/vecmath.git
# Edit the build.xml files in each directory and update source and target from 1.6 to 1.7
(cd vecmath; ant)

mkdir jogl-v2.3.2
cd jogl-v2.3.2/
wget https://jogamp.org/deployment/v2.3.2/jar/jogl-all.jar
wget https://jogamp.org/deployment/v2.3.2/jar/gluegen-rt.jar

In java3d-core/build.xml and java3d-utils/build.xml: Add classpath for the javadoc target.

Edit java3d-utils/src/com/sun/j3d/utils/applet/JMainFrame.java and java3d-utils/src/com/sun/j3d/utils/applet/JMainFrame.java

        throw new RuntimeException("sun.applet.AppletAudioClip() not supported.");
        //return new sun.applet.AppletAudioClip( url );          

Finish the build:

(cd java3d-core; ant)
(cd java3d-utils; ant)
cp java3d-utils/build/jars/j3dutils.jar $PTII/vendors/j3d/lib/
cp java3d-core/build/jars/j3dcore.jar $PTII/vendors/j3d/lib/
cp vecmath/build/jars/vecmath.jar $PTII/vendors/j3d/lib/

Running

  $PTII/bin/vergil /home/cxh/src/ptII/ptolemy/domains/gr/demo/StickyMasses/StickyMasses.xml 

Need Jogamp in the path

ptolemy.kernel.util.IllegalActionException:   in .StickyMasses.manager
Because:
com/jogamp/opengl/GL
        at ptolemy.actor.Manager.execute(Manager.java:505)
        at ptolemy.actor.Manager.run(Manager.java:1263)
        at ptolemy.actor.Manager$PtolemyRunThread.run(Manager.java:1915)
Caused by: java.lang.NoClassDefFoundError: com/jogamp/opengl/GL

As a hack edited $PTII/bin/vergil and added

  :/home/cxh/src/jogl-v2.3.2/gluegen-rt.jar:/home/cxh/src/jogl-v2.3.2/jogl-all.jar

to the ALL_JARS line

Now Vergil fails with:

ptolemy.kernel.util.IllegalActionException:   in .Universe.manager
Because:
Can't load library: /home/cxh/src/ptII/natives/linux-amd64//libgluegen-rt.so
        at ptolemy.actor.Manager.execute(Manager.java:505)
        at ptolemy.actor.Manager.run(Manager.java:1263)
        at ptolemy.actor.Manager$PtolemyRunThread.run(Manager.java:1915)
Caused by: java.lang.UnsatisfiedLinkError: Can'
t load library: /home/cxh/src/ptII/natives/linux-amd64//libgluegen-rt.so
        at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2620)

Running a demo with debugging turned on:

java -classpath $PTII:/home/cxh/src/ptII/vendors/j3d/lib/Linux/j3dcore.jar:/home/cxh/s\
rc/ptII/vendors/j3d/lib/Linux/j3dutils.jar:/home/cxh/src/ptII/vendors/j3d/lib/Linux/vecmath.j\
ar::/home/cxh/src/ptII/vendors/jogl/lib/Linux/gluegen-rt.jar:/home/cxh/src/ptII/vendors/jogl/\
lib/Linux/jogl-all.jar:/home/cxh/src/ptII/vendors/jogl/lib/natives/linux-amd64/gluegen-rt-nat\
ives-linux-amd64.jar:/home/cxh/src/ptII/vendors/jogl/lib/natives/linux-amd64/jogl-all-natives\
-linux-amd64.jar -Djogamp.debug.JNILibLoader ptolemy.vergil.VergilApplication BouncingBall.xml

indicates that the code is looking for the native jars in the same directory as the main jars, so moving the native jars fixes the problem.

createImpl ARB n/a but required, profile > GL2 requested (OpenGL >= 3.1).

During a run on Travis with

####### 18 Tue Jul 16 07:32:34 UTC 2019 $PTII/bin/ptinvoke ptolemy.vergil.basic.export.ExportModel -force htm -run -openComposites -timeOut 30000 -whiteBackground ptolemy/domains/continuous/demo/CartPendulum/CartPendulum.xml $PTII/ptolemy/domains/continuous/demo/CartPendulum/CartPendulum
    [junit] Running .CartPendulum
    [junit] WARNING: An illegal reflective access operation has occurred
    [junit] WARNING: Illegal reflective access by javax.media.j3d.JoglPipeline (file:/home/travis/build/icyphy/ptII/vendors/j3d/lib/Linux/j3dcore.jar) to method sun.awt.AppContext.getAppContext()
    [junit] WARNING: Please consider reporting this to the maintainers of javax.media.j3d.JoglPipeline
    [junit] WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
    [junit] WARNING: All illegal access operations will be denied in a future release
    [junit] 18211 ms. Memory: 1894400K Free: 1210271K (64%)
    [junit] com.jogamp.opengl.GLException: J3D-Renderer-1: createImpl ARB n/a but required, profile > GL2 requested (OpenGL >= 3.1). Requested: GLProfile[GL3bc/GL3bc.sw], current: 3.0 (Compat profile, compat[ES2], FBO, software) - 3.0 Mesa 18.0.5
    [junit]     at jogamp.opengl.x11.glx.X11GLXContext.createImpl(X11GLXContext.java:440)
    [junit]     at jogamp.opengl.GLContextImpl.makeCurrentWithinLock(GLContextImpl.java:765)
    [junit]     at jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:648)
    [junit]     at jogamp.opengl.GLContextImpl.makeCurrent(GLContextImpl.java:586)
    [junit]     at javax.media.j3d.JoglPipeline.createNewContext(JoglPipeline.java:6411)
    [junit]     at javax.media.j3d.Canvas3D.createNewContext(Canvas3D.java:4612)
    [junit]     at javax.media.j3d.Canvas3D.createNewContext(Canvas3D.java:2386)
    [junit]     at javax.media.j3d.Renderer.doWork(Renderer.java:881)
    [junit]     at javax.media.j3d.J3dThread.run(J3dThread.java:271)

TriangleArray: illegal vertexCount

TextString3D does not work under JDK 12 and Ubuntu

The summary is that GR domain models that use TextString3D under JDK 12 and Ubuntu fail with a illegal vertexCount message.

TextString3D works fine under JDK 12 and Darwin.

TextString3D works fine under JDK 8 and Ubuntu

Changing the version of JOGL from the Mac version shipped with 11.0 (see below for where those jars came from) to a version built using the JOGL head does not change anything.

Adding similar code to the PyramidExample does not cause the PyramidExample to fail under JDK12 and Ubuntu.

Using XDummy to address the GL warnings does not cause TextString3D to work under JDK12 and Ubuntu.

Interesting, enabling JOGL debugging causes a NPE at EGLGraphicsConfigurationFactory.getAvailableCapabilities, even if we use XDummy.

For now, the workaround is to not use TextString3D under JDK 12 and Ubuntu

Details

Under travis,

  ptolemy/domains/gr/demo/Pendulum/Pendulum.xml (RunExportModel)

was failing with:

.Pendulum.Text: Failed to create the Text3D.  Trying with the default font.
ptolemy.kernel.util.IllegalActionException: Failed to create Text3D for font "javax.media.j3d.Font3D@3928e783" java.awt.Font[family=SansSerif,name=SansSerif,style=plain,size=1] and "Pendulum Model".
  in .Pendulum.Text
Because:
TriangleArray: illegal vertexCount
        at ptolemy.domains.gr.lib.TextString3D._createModel(TextString3D.java:265)
        at ptolemy.domains.gr.lib.GRShadedShape.initialize(GRShadedShape.java:336)
        at ptolemy.actor.Director.initialize(Director.java:938)
        at ptolemy.actor.Director.initialize(Director.java:907)
        at ptolemy.actor.sched.StaticSchedulingDirector.initialize(StaticSchedulingDirector.java:159)
        at ptolemy.domains.gr.kernel.GRDirector.initialize(GRDirector.java:290)
        at ptolemy.actor.CompositeActor.initialize(CompositeActor.java:935)
        at ptolemy.actor.Manager.initialize(Manager.java:724)
        at ptolemy.actor.Manager.execute(Manager.java:356)
        at ptolemy.vergil.basic.export.ExportModel$2.run(ExportModel.java:390)
        at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:303)
        at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
        at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
        at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
        at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Caused by: java.lang.IllegalArgumentException: TriangleArray: illegal vertexCount
        at javax.media.j3d.TriangleArray.<init>(TriangleArray.java:102)
        at com.sun.j3d.utils.geometry.GeometryInfo.getGeometryArray(GeometryInfo.java:2574)
        at com.sun.j3d.utils.geometry.GeometryServiceImpl.triangulateIslands(GeometryServiceImpl.java:32)
        at javax.media.j3d.Font3D.triangulateGlyphs(Font3D.java:473)
        at javax.media.j3d.Text3DRetained.updateCharacterData(Text3DRetained.java:700)
        at javax.media.j3d.Text3DRetained.setString(Text3DRetained.java:254)
        at javax.media.j3d.Text3D.<init>(Text3D.java:276)
        at ptolemy.domains.gr.lib.TextString3D._createModel(TextString3D.java:248)
        ... 22 more
  • J3D font problems on Ubuntu + OpenJDK has a similar stack trace. Running in debug mode is suggested.
    • "I advise you to use the debug mode, maybe the loading of the font fails and it tries to build a triangle array with a vertex count that can't make triangles."
      • Running with Jogl debugging
        java -Dnewt.debug=all -Dnativewindow.debug=all -Djogl.debug=all -classpath "$PTII/vendors/j3d/lib/Linux/*:/home/cxh/src/jogl/jogl/build/jar/jogl-all.jar:/home/cxh/src/jogl/jogl/build/jar/jogl-all-natives-linux-amd64.jar:/home/cxh/src/jogl/gluegen/build/gluegen-rt-natives-linux-amd64.jar:/home/cxh/src/jogl/gluegen/build/gluegen-rt.jar:$PTII:.:/home/cxh/src/jogl/jogl/build/jogl/jogl-fonts-p0.jar" ptolemy.vergil.basic.export.ExportModel -force htm -run -openComposites -timeOut 30000 -whiteBackground ptolemy/domains/gr/demo/Pendulum/Pendulum.xml $PTII/ptolemy/domains/gr/demo/Pendulum/
      • throws a NPE?
        Caused by: java.lang.NullPointerException
                at jogamp.opengl.egl.EGLGraphicsConfigurationFactory.getAvailableCapabilities(EGLGraphicsConfigurationFactory.java:191)
                at jogamp.opengl.egl.EGLDrawableFactory.getAvailableCapabilitiesImpl(EGLDrawableFactory.java:1015)
                at com.jogamp.opengl.GLDrawableFactory.getAvailableCapabilities(GLDrawableFactory.java:494)
                at com.jogamp.opengl.JoglVersion.getAvailableCapabilitiesInfo(JoglVersion.java:79)
                at com.jogamp.opengl.JoglVersion.getAllAvailableCapabilitiesInfo(JoglVersion.java:106)
                at com.jogamp.opengl.JoglVersion.getDefaultOpenGLInfo(JoglVersion.java:124)
                at com.jogamp.opengl.GLProfile.initSingleton(GLProfile.java:247)
                at com.jogamp.opengl.GLProfile.getProfileMap(GLProfile.java:2297)
                at com.jogamp.opengl.GLProfile.get(GLProfile.java:1021)
                at com.jogamp.opengl.GLProfile.get(GLProfile.java:1050)
                at com.jogamp.opengl.GLProfile.getMaxFixedFunc(GLProfile.java:803)
                at javax.media.j3d.JoglPipeline.initialize(JoglPipeline.java:131)
                at javax.media.j3d.Pipeline.createPipeline(Pipeline.java:92)
                at javax.media.j3d.MasterControl.loadLibraries(MasterControl.java:858)
                at javax.media.j3d.VirtualUniverse.<clinit>(VirtualUniverse.java:267)
    • To enable Java3D debugging, edit java3d-core/build.xml and recompile with ant jar
      <property name="is_dev_phase" value="true"/>
      <property name="is_production" value="false"/>
      ...
      <filter token="IS_DEBUG" value="true"/>
  • The problem occurs under Ubuntu JDK 12, but not Oracle JDK 8 using recent Jogl and Java3D compiled from github.
  cxh@swarmnuc2008:~/src/ptII$ java -version
  java version "12.0.1" 2019-04-16
  Java(TM) SE Runtime Environment (build 12.0.1+12)
  Java HotSpot(TM) 64-Bit Server VM (build 12.0.1+12, mixed mode, sharing)
cxh@swarmnuc2008:~/src/ptII$ java -classpath "$PTII/vendors/j3d/lib/Darwin/*:$PTII/vendors/jogl/lib/Darwin/*:$PTII:." ptolemy.vergil.VergilApplication -ptiny $PTII/ptolemy/domains/gr/demo/Pendulum/Pendulum.xml
ConfigurationApplication(): Could not add the ptolemy library directory to the Java library path: java.io.IOException: Failed to get field handle to set library path
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by javax.media.j3d.JoglPipeline (file:/home/cxh/src/ptII/vendors/j3d/lib/Darwin/vecmath.jar) to method sun.awt.AppContext.getAppContext()
WARNING: Please consider reporting this to the maintainers of javax.media.j3d.JoglPipeline
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
creating preferred configuration...
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
***** polygon with only one vertex?! *****

.Pendulum.Text: Failed to create the Text3D.  Trying with the default font.
***** polygon with only one vertex?! *****

13747 ms. Memory: 40960K Free: 13169K (32%)

Could the libGL errors be part of the problem?

  • Adding the following to PyramidExample.java (see far below) does not replicate the problem:
        javax.media.j3d.FontExtrusion extrusion = new javax.media.j3d.FontExtrusion(
                    new java.awt.geom.Line2D.Double(0.0, 0.0, 0.2, 0.0));

        javax.media.j3d.Font3D font3D = new javax.media.j3d.Font3D(new java.awt.Font(null, java.awt.Font.PLAIN, 1), extrusion);
        javax.media.j3d.Text3D _textGeometry = new javax.media.j3d.Text3D(font3D, "Pyramid Power!");
  • Run a single Jogl font test:
java -classpath '../gluegen/make/lib/junit.jar:../gluegen/make/lib/*:../gluegen/build/test/build/classes:build/test/build/classes:../gluegen/build/gluegen-rt.jar:../gluegen/build/gluegen-rt-natives-linux-amd64.jar:./build/jar/jogl-all.jar:./build/jar/jogl-all-natives-linux-amd64.jar:./build/jar/atomic/jogl-fonts-p0.jar' com.jogamp.opengl.test.junit.graph.TestFontsNEWT00

XDummy

Running Xdummy solved the libGL problems but the triangle vertex error continued.

As root

    Xorg -noreset +extension GLX +extension RANDR +extension RENDER -logfile ./10.log -config ./xorg.conf :10

glxinfo looks good:

root@swarmnuc2008:/home/cxh/src/ptII# glxinfo | grep render
direct rendering: Yes
    GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer,
    GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer,
Extended renderer info (GLX_MESA_query_renderer):
OpenGL renderer string: Mesa DRI Intel(R) Haswell Mobile
    GL_ARB_conditional_render_inverted, GL_ARB_conservative_depth,
    GL_MESA_texture_signed_rgba, GL_NV_conditional_render, GL_NV_depth_clamp,
    GL_ARB_conditional_render_inverted, GL_ARB_conservative_depth,
    GL_NV_conditional_render, GL_NV_depth_clamp, GL_NV_light_max_exponent,
    GL_OES_fbo_render_mipmap, GL_OES_get_program_binary, GL_OES_mapbuffer,
root@swarmnuc2008:/home/cxh/src/ptII#

Still failed:

root@swarmnuc2008:/home/cxh/src/ptII# $PTII/bin/ptinvoke  ptolemy.vergil.basic.export.ExportModel -force htm -r\
un -openComposites -timeOut 30000 -whiteBackground ptolemy/domains/gr/demo/Pendulum/Pendulum.xml $PTII/ptolemy/\
domains/gr/demo/Pendulum/
ConfigurationApplication(): Could not add the ptolemy library directory to the Java library path: java.io.IOExc\
eption: Failed to get field handle to set library path
Running .Pendulum
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by javax.media.j3d.JoglPipeline (file:/home/cxh/src/ptII/vendors/j3d/lib/Lin\
ux/j3dcore.jar) to method sun.awt.AppContext.getAppContext()
WARNING: Please consider reporting this to the maintainers of javax.media.j3d.JoglPipeline
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
***** polygon with only one vertex?! *****

triangluateIslands(): 2 2 1 1 1
.Pendulum.Text: Failed to create the Text3D.  Trying with the default font.
***** polygon with only one vertex?! *****

triangluateIslands(): 2 2 1 1 1
1768 ms. Memory: 70656K Free: 30918K (44%)
ptolemy.kernel.util.IllegalActionException: Failed to create Text3D for font "javax.media.j3d.Font3D@20353b4e" \
java.awt.Font[family=SansSerif,name=SansSerif,style=plain,size=1] and "Pendulum Model".
  in .Pendulum.Text
Because:
TriangleArray: illegal vertexCount vertexCount: 0
        at ptolemy.domains.gr.lib.TextString3D._createModel(TextString3D.java:265)
        at ptolemy.domains.gr.lib.GRShadedShape.initialize(GRShadedShape.java:336)
        at ptolemy.actor.Director.initialize(Director.java:938)
        at ptolemy.actor.Director.initialize(Director.java:907)
...

Ancient History

Below here is mainly for historical reasons and probably not that interesting

Java3D seems to have various problems.

Windows via Windows Remote Desktop (RDP) on the Mac.

It appears that running a Java3D app on a Windows box and displaying it on a Mac will not work. See https://www.java.net/node/688085

Running Java 3D with Xvfb causes problems

1/8/15: RHEL6. After installing Eclipse, which updated a bunch of X stuff, running a Ptolemy model that uses Java3D fails:

[junit] java.lang.NullPointerException: Canvas3D: null GraphicsConfiguration
[junit] at javax.media.j3d.Canvas3D.checkForValidGraphicsConfig(Canvas3D.java:982)
[junit] at javax.media.j3d.Canvas3D.<init>(Canvas3D.java:1025)
[junit] at ptolemy.domains.gr.lib.ViewScreen3D._createViewScreen(ViewScreen3D.java:534)
[junit] at ptolemy.domains.gr.lib.ViewScreen3D.initialize(ViewScreen3D.java:284)
[junit] at ptolemy.actor.Director.initialize(Director.java:948)
[junit] at ptolemy.actor.Director.initialize(Director.java:917)
[junit] at ptolemy.actor.sched.StaticSchedulingDirector.initialize(StaticSchedulingDirector.java:159)
[junit] at ptolemy.domains.gr.kernel.GRDirector.initialize(GRDirector.java:289)
[junit] at ptolemy.actor.CompositeActor.initialize(CompositeActor.java:915)
[junit] at ptolemy.actor.process.ProcessThread.run(ProcessThread.java:138)

3/16/2015: The NPE returns

Between Mar. 4 and Mar 6, we started seeing java.lang.NullPointerException: Canvas3D: null GraphicsConfiguration

The machine was patched on Mar. 6

[root@terra ~]# yum history
Loaded plugins: product-id, rhnplugin, security, subscription-manager
This system is receiving updates from RHN Classic or RHN Satellite.
ID | Login user | Date and time | Action(s) | Altered
-------------------------------------------------------------------------------
85 | <cxh> | 2015-03-06 09:54 | Update | 17 EE
84 | <cxh> | 2015-03-02 14:14 | Install | 3

Xvfb changed, though the create time does not match the update?

bash-4.1$ which Xvfb
/usr/bin/Xvfb
bash-4.1$ ls -lct /usr/bin/Xvfb
-rwxr-xr-x 1 root root 2007800 Mar 7 03:34 /usr/bin/Xvfb

yum history info 85 includes these packages, note that Xvfb was updated.

Updated xorg-x11-server-Xvfb-1.15.0-25.el6_6.x86_64 @rhel-x86_64-server-optional-6
Update 1.15.0-25.1.el6_6.x86_64 @rhel-x86_64-server-optional-6
Updated xorg-x11-server-common-1.15.0-25.el6_6.x86_64 @rhel-x86_64-server-6
Update 1.15.0-25.1.el6_6.x86_64 @rhel-x86_64-server-6

Solution: Copy old binary from Sisyphus

I copied the old Xvfb binary that worked from sisyphus.eecs to jenkins.eecs. Below is what is on Jenkins.

[root@terra bin]# ls -l /usr/bin/Xvfb*
-rwxr-xr-x 1 root root 1870456 Mar 16 09:27 /usr/bin/Xvfb
-rwxr-xr-x 1 root root 2007800 Dec 10 07:45 /usr/bin/Xvfb.failsWithJava3D
-rwxr-xr-x 1 root root 2007800 Jan 29 12:16 /usr/bin/Xvfb.failsWithJava3D_2
-rwxr-xr-x 1 root root 1870456 Mar 16 09:27 /usr/bin/Xvfb.worksWithJava3D
[root@terra bin]#

1/26/2015: glxinfo and Xvfb solve the problem

While working on the Matlab problem, I came across http://dri.freedesktop.org/wiki/glxinfo/, which said to run glxinfo | grep render. When I run it on terra, where Java 3D does not work, I get nothing. On sisyphus, I get:

bash-4.1$ glxinfo | grep render
direct rendering: Yes
GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer,
OpenGL renderer string: Software Rasterizer
GL_EXT_vertex_array_bgra, GL_NV_conditional_render, GL_ARB_debug_output,
bash-4.1$

So as root I ran yum install glx-utils.x86_64

Then glxinfo | grep render worked!

Solution: Use Xvfb from the old machine

That did not solve it. I looked at how Xvfb was installed on sisyphus and when I copied the binary over to terra, it worked!

My notes about how I installed Xvfb say: "So, my workaround was to install the Centos 6.2 package at http://rpmfind.net/linux/RPM/centos/updates/6.2/x86_64/Packages/xorg-x11-server-Xvfb-1.10.4-6.el6.centos.3.x86_64.html"

Here's what's in it.

 root@sisyphus ~]# rpm -qpl xorg-x11-server-Xvfb-1.10.4-6.el6.centos.3.x86_64.rpm
 warning: xorg-x11-server-Xvfb-1.10.4-6.el6.centos.3.x86_64.rpm: Header V3 RSA/SHA1 Signature,  key ID c105b9de: NOKEY
 /usr/bin/Xvfb
 /usr/bin/xvfb-run
 /usr/share/man/man1/Xvfb.1.gz

Another attempt

1/23/2015

Interestingly, the tests are working on sisyphus, which is running the same OS, but has not been rebooted for 70 days.

I suspect this 12/11 change: https://ucbrhn.Berkeley.EDU/rhn/errata/details/Details.do?eid=60134

1/8/2015 An attempt

[cxh@terra ptII]$ Xvfb :2 -screen 0 1024x768x24 &
[1] 10616
[cxh@terra ptII]$ _XSERVTransmkdir: Owner of /tmp/.X11-unix should be set to root
Initializing built-in extension Generic Event Extension
Initializing built-in extension SHAPE
Initializing built-in extension MIT-SHM
Initializing built-in extension XInputExtension
Initializing built-in extension XTEST
Initializing built-in extension BIG-REQUESTS
Initializing built-in extension SYNC
Initializing built-in extension XKEYBOARD
Initializing built-in extension XC-MISC
Initializing built-in extension SECURITY
Initializing built-in extension XINERAMA
Initializing built-in extension XFIXES
Initializing built-in extension RENDER
Initializing built-in extension RANDR
Initializing built-in extension COMPOSITE
Initializing built-in extension DAMAGE
Initializing built-in extension MIT-SCREEN-SAVER
Initializing built-in extension DOUBLE-BUFFER
Initializing built-in extension RECORD
Initializing built-in extension DPMS
Initializing built-in extension Present
Initializing built-in extension X-Resource
Initializing built-in extension XVideo
Initializing built-in extension XVideo-MotionCompensation
Initializing built-in extension SELinux
Initializing built-in extension GLX

[cxh@terra ptII]$ ls -l /tmp/.X11-unix/
total 0
srwxrwxrwx 1 cxh cxh 0 Jan 8 15:28 X2
[cxh@terra ptII]$

I fixed the permissions of /tmp/.X11-unix/ but the problems persist. They seem to be intermittent.

The problem is that com.sun.j3d.utils.universe.SimpleUniverse.getPreferredConfiguration() is returning null. ViewScree3D.java looks like:

      GraphicsConfiguration config = SimpleUniverse
                .getPreferredConfiguration();

...
      _canvas = new Canvas3D(config);

It seems like config is sometimes null.

One possible solution was as root to do yum groupinstall "X Window System".

Rolling back

The Java 3D tests worked with Build #20 (Jan 7, 2015 9:50:07 AM):

[junit] ####### 402 Wed Jan 07 11:53:48 PST 2015 $PTII/bin/ptinvoke ptolemy.vergil.basic.export.ExportModel -force htm -run -timeOut 30000 -whiteBackground ptolemy/do\
mains/sdf/demo/Gravitation/GravitationWithCollisionDetection.xml $PTII/ptolemy/domains/sdf/demo/Gravitation/GravitationWithCollisionDetection
[junit] Warning: not opening composites for ptolemy/domains/sdf/demo/Gravitation/GravitationWithCollisionDetection.xml. See ptolemy/vergil/basic/export/test/junit/Expo\
rtModelJUnitTest.java
[junit] reading configuration
[junit] Running .GravitationWithCollisionDetection
[junit] ExportHTMLTimer went off after 30000 ms., calling getDirector().finish and getDirector().stopFire()
[junit] 30015 ms. Memory: 4435456K Free: 1509754K (34%)
[junit] Exported /var/lib/jenkins/workspace/ptII/ptolemy/domains/sdf/demo/Gravitation/GravitationWithCollisionDetection/index.html
[junit] Copying the contents of /var/lib/jenkins/workspace/ptII/ptolemy/domains/sdf/demo/Gravitation/../../doc/toc.htm
[junit] 34238 ms. Memory: 4435456K Free: 1426201K (32%)

 and started failing with Build #21 (Jan 7, 2015 9:38:00 PM) 
[junit] ####### 402 Wed Jan 07 23:31:35 PST 2015 $PTII/bin/ptinvoke ptolemy.vergil.basic.export.ExportModel -force htm -run -timeOut 30000 -whiteBackground ptolemy/do\
mains/sdf/demo/Gravitation/GravitationWithCollisionDetection.xml $PTII/ptolemy/domains/sdf/demo/Gravitation/GravitationWithCollisionDetection
[junit] Warning: not opening composites for ptolemy/domains/sdf/demo/Gravitation/GravitationWithCollisionDetection.xml. See ptolemy/vergil/basic/export/test/junit/Expo\
rtModelJUnitTest.java
[junit] reading configuration
[junit] Running .GravitationWithCollisionDetection
[junit] java.lang.NullPointerException: Canvas3D: null GraphicsConfiguration
[junit] at javax.media.j3d.Canvas3D.checkForValidGraphicsConfig(Canvas3D.java:982)
[junit] at javax.media.j3d.Canvas3D.<init>(Canvas3D.java:1025)
[junit] at ptolemy.domains.gr.lib.ViewScreen3D._createViewScreen(ViewScreen3D.java:534)
[junit] at ptolemy.domains.gr.lib.ViewScreen3D.initialize(ViewScreen3D.java:284)
[junit] at ptolemy.actor.Director.initialize(Director.java:948)
[junit] at ptolemy.actor.Director.initialize(Director.java:917)
[junit] at ptolemy.actor.sched.StaticSchedulingDirector.initialize(StaticSchedulingDirector.java:159)
[junit] at ptolemy.domains.gr.kernel.GRDirector.initialize(GRDirector.java:289)
[junit] at ptolemy.actor.CompositeActor.initialize(CompositeActor.java:915)
[junit] at ptolemy.actor.Director.initialize(Director.java:948)
[junit] at ptolemy.actor.Director.initialize(Director.java:917)
[junit] at ptolemy.actor.sched.StaticSchedulingDirector.initialize(StaticSchedulingDirector.java:159)
[junit] at ptolemy.domains.sdf.kernel.SDFDirector.initialize(SDFDirector.java:540)
[junit] at ptolemy.actor.CompositeActor.initialize(CompositeActor.java:915)
[junit] at ptolemy.actor.Manager.initialize(Manager.java:674)
[junit] at ptolemy.actor.Manager.execute(Manager.java:344)
[junit] at ptolemy.vergil.basic.export.ExportModel$2.run(ExportModel.java:392)
[junit] at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:301)
[junit] at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:744)
[junit] at java.awt.EventQueue.access$400(EventQueue.java:97)
[junit] at java.awt.EventQueue$3.run(EventQueue.java:697)
[junit] at java.awt.EventQueue$3.run(EventQueue.java:691)
[junit] at java.security.AccessController.doPrivileged(Native Method)

Looking at the output of yum history:

[root@terra ~]# yum history
Loaded plugins: product-id, refresh-packagekit, rhnplugin, security,
: subscription-manager
This system is receiving updates from RHN Classic or RHN Satellite.
ID | Login user | Date and time | Action(s) | Altered
-------------------------------------------------------------------------------
54 | <cxh> | 2015-01-08 16:22 | Install | 120
53 | <cxh> | 2015-01-08 16:18 | Install | 120
52 | <cxh> | 2015-01-08 16:03 | Install | 125
51 | <cxh> | 2015-01-08 15:09 | Update | 7
50 | <cxh> | 2015-01-07 09:14 | Install | 197
49 | <cxh> | 2015-01-07 08:59 | Install | 7
48 | <cxh> | 2015-01-07 08:53 | Install | 8
47 | <cxh> | 2015-01-06 09:18 | E, I, U | 59 EE
46 | <cxh> | 2014-12-31 09:08 | Install | 1
45 | <cxh> | 2014-12-31 09:02 | Install | 3
44 | <cxh> | 2014-12-31 08:37 | I, U | 4
43 | <cxh> | 2014-12-29 10:37 | Install | 1
42 | <cxh> | 2014-12-29 10:04 | Install | 1
41 | <cxh> | 2014-12-29 10:02 | Install | 1
40 | <cxh> | 2014-12-29 09:53 | Install | 1
39 | <cxh> | 2014-12-29 08:58 | Install | 7
38 | <cxh> | 2014-12-29 08:37 | Install | 16
37 | <cxh> | 2014-12-29 08:36 | Install | 1
36 | <cxh> | 2014-12-29 08:29 | Install | 1
35 | <cxh> | 2014-12-29 07:18 | Install | 2

As the tests stopped working after Jan 7, 2015 9:50:07 AM, Numbers 51-54 are suspect and 48-50 could be problems

  • 54: groupinstall KDE Desktop
  • 53: groupinstall Desktop
  • 52: groupinstall X Window System
  • 51: update (glibc was changed)
  • 50: install eclipse-*
  • 49: install eclipse-rcp.x86_64
  • 48: install firefox

Test procedure

1. history rollback N 2. Reboot 3. As jenkins, try to replicate the problem

Linux via ssh -X

Logging in to a RHEL box from Mac OS X with ssh -X and then running javaws fails:

bash-4.1$ gdb /etc/alternatives/java_sdk/bin/javaws
GNU gdb (GDB) 7.6
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/lib/jvm/jdk1.7.0_25/bin/javaws...(no debugging symbols found)...done.
(gdb) r http://ptolemy.eecs.berkeley.edu/ptolemyII/ptII10.0/ptII10.0.devel/ptolemy/domains/ddf/demo/HanoiTower/HanoiTower.jnlp
Starting program: /usr/lib/jvm/jdk1.7.0_25/bin/javaws http://ptolemy.eecs.berkeley.edu/ptolemyII/ptII10.0/ptII10.0.devel/ptolemy/domains/ddf/demo/HanoiTowe\
r/HanoiTower.jnlp
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Program received signal SIGILL, Illegal instruction.
0x000000373f366297 in gtk_message_dialog_get_image () from /usr/lib64/libgtk-x11-2.0.so.0
(gdb) where
#0 0x000000373f366297 in gtk_message_dialog_get_image () from /usr/lib64/libgtk-x11-2.0.so.0
#1 0x000000000082ec80 in ?? ()
#2 0x000000000082ec90 in ?? ()
#3 0x0000000000000000 in ?? ()
(gdb) quit
A debugging session is active.

Inferior 1 [process 10683] will be killed.

Quit anyway? (y or n) y

Mac

UnsatisifiedLinkError: jogamp.common.jvm.JVMUtil.initialize(Ljava/nio/ByteBuffer;)Z

When running open Vergil.app and then running the GR Pendulum demo, I get

ptolemy.kernel.util.IllegalActionException:   in .Pendulum.manager
Because:
jogamp.common.jvm.JVMUtil.initialize(Ljava/nio/ByteBuffer;)Z
        at ptolemy.actor.Manager.execute(Manager.java:488)
        at ptolemy.actor.Manager.run(Manager.java:1202)
        at ptolemy.actor.Manager$PtolemyRunThread.run(Manager.java:1807)
Caused by: java.lang.UnsatisfiedLinkError: jogamp.common.jvm.JVMUtil.initialize(Ljava/nio/ByteBuffer;)Z
        at jogamp.common.jvm.JVMUtil.initialize(Native Method)
        at jogamp.common.jvm.JVMUtil.<clinit>(JVMUtil.java:58)
        at com.jogamp.common.os.Platform$1.run(Platform.java:212)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.jogamp.common.os.Platform.<clinit>(Platform.java:179)
        at javax.media.opengl.GLProfile.<clinit>(GLProfile.java:120)
        at jogamp.opengl.ThreadingImpl$1.run(ThreadingImpl.java:83)
        at jogamp.opengl.ThreadingImpl$1.run(ThreadingImpl.java:66)
        at java.security.AccessController.doPrivileged(Native Method)
        at jogamp.opengl.ThreadingImpl.<clinit>(ThreadingImpl.java:66)
        at javax.media.opengl.Threading.disableSingleThreading(Threading.java:164)
        at javax.media.j3d.JoglPipeline.initialize(JoglPipeline.java:130)
        at javax.media.j3d.Pipeline.createPipeline(Pipeline.java:92)
        at javax.media.j3d.MasterControl.loadLibraries(MasterControl.java:837)
        at javax.media.j3d.VirtualUniverse.<clinit>(VirtualUniverse.java:274)
        at javax.media.j3d.GroupRetained.<init>(GroupRetained.java:155)
        at javax.media.j3d.Group.createRetained(Group.java:88)
        at javax.media.j3d.SceneGraphObject.<init>(SceneGraphObject.java:114)
        at javax.media.j3d.Node.<init>(Node.java:172)
        at javax.media.j3d.Group.<init>(Group.java:551)
        at com.sun.j3d.utils.geometry.Primitive.<init>(Primitive.java:136)
        at com.sun.j3d.utils.geometry.Sphere.<init>(Sphere.java:190)
        at ptolemy.domains.gr.lib.Sphere3D._createModel(Sphere3D.java:164)
        at ptolemy.domains.gr.lib.GRShadedShape.initialize(GRShadedShape.java:335)
        at ptolemy.actor.Director.initialize(Director.java:935)
        at ptolemy.actor.Director.initialize(Director.java:904)
        at ptolemy.actor.sched.StaticSchedulingDirector.initialize(StaticSchedulingDirector.java:159)
        at ptolemy.domains.gr.kernel.GRDirector.initialize(GRDirector.java:289)
        at ptolemy.actor.CompositeActor.initialize(CompositeActor.java:915)
        at ptolemy.actor.Manager.initialize(Manager.java:674)
        at ptolemy.actor.Manager.execute(Manager.java:344)
        ... 2 more
Caused by: java.lang.UnsatisfiedLinkError: jogamp.common.jvm.JVMUtil.initialize(Ljava/nio/ByteBuffer;)Z
        at jogamp.common.jvm.JVMUtil.initialize(Native Method)
        at jogamp.common.jvm.JVMUtil.<clinit>(JVMUtil.java:58)
        at com.jogamp.common.os.Platform$1.run(Platform.java:212)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.jogamp.common.os.Platform.<clinit>(Platform.java:179)
        at javax.media.opengl.GLProfile.<clinit>(GLProfile.java:120)
        at jogamp.opengl.ThreadingImpl$1.run(ThreadingImpl.java:83)
        at jogamp.opengl.ThreadingImpl$1.run(ThreadingImpl.java:66)
        at java.security.AccessController.doPrivileged(Native Method)
        at jogamp.opengl.ThreadingImpl.<clinit>(ThreadingImpl.java:66)
        at javax.media.opengl.Threading.disableSingleThreading(Threading.java:164)
        at javax.media.j3d.JoglPipeline.initialize(JoglPipeline.java:130)
        at javax.media.j3d.Pipeline.createPipeline(Pipeline.java:92)
        at javax.media.j3d.MasterControl.loadLibraries(MasterControl.java:837)
        at javax.media.j3d.VirtualUniverse.<clinit>(VirtualUniverse.java:274)
        at javax.media.j3d.GroupRetained.<init>(GroupRetained.java:155)
        at javax.media.j3d.Group.createRetained(Group.java:88)
        at javax.media.j3d.SceneGraphObject.<init>(SceneGraphObject.java:114)
        at javax.media.j3d.Node.<init>(Node.java:172)
        at javax.media.j3d.Group.<init>(Group.java:551)
        at com.sun.j3d.utils.geometry.Primitive.<init>(Primitive.java:136)
        at com.sun.j3d.utils.geometry.Sphere.<init>(Sphere.java:190)
        at ptolemy.domains.gr.lib.Sphere3D._createModel(Sphere3D.java:164)
        at ptolemy.domains.gr.lib.GRShadedShape.initialize(GRShadedShape.java:335)
        at ptolemy.actor.Director.initialize(Director.java:935)
        at ptolemy.actor.Director.initialize(Director.java:904)
        at ptolemy.actor.sched.StaticSchedulingDirector.initialize(StaticSchedulingDirector.java:159)
        at ptolemy.domains.gr.kernel.GRDirector.initialize(GRDirector.java:289)
        at ptolemy.actor.CompositeActor.initialize(CompositeActor.java:915)
        at ptolemy.actor.Manager.initialize(Manager.java:674)
        at ptolemy.actor.Manager.execute(Manager.java:344)
        at ptolemy.actor.Manager.run(Manager.java:1202)
        at ptolemy.actor.Manager$PtolemyRunThread.run(Manager.java:1807)

The issue here is that DYLD_LIBRARY_PATH includes Matlab, which presumably includes jogamp.

bash-3.2$ echo $DYLD_LIBRARY_PATH
/Users/cxh/src/ptII10.0.beta/lib:/Applications/MATLAB_R2012a.app/bin/maci64:/Users/cxh/src/ptII10.0.beta/lib:/Applications/MATLAB_R2012a.app/bin/maci64

If I do unset DYLD_LIBRARY_PATH, then the demo works.

Java 1.8: apple/awt/CGraphicsDevice

Invoking with:

java -classpath /Users/cxh/Downloads/jogl/jogamp-all-platforms/jar/jogl-all.jar:${PTII} ptolemy.vergil.VergilApplication $PTII/ptolemy/domains/gr/demo/Pendulum/Pendulum.xml

fails with:

ptolemy.kernel.util.IllegalActionException:   in .Pendulum.manager
Because:
apple/awt/CGraphicsDevice
        at ptolemy.actor.Manager.execute(Manager.java:488)
        at ptolemy.actor.Manager.run(Manager.java:1202)
        at ptolemy.actor.Manager$PtolemyRunThread.run(Manager.java:1807)
Caused by: java.lang.NoClassDefFoundError: apple/awt/CGraphicsDevice
        at javax.media.j3d.GraphicsConfigTemplate3D.<clinit>(GraphicsConfigTemplate3D.java:55)
        at com.sun.j3d.utils.universe.SimpleUniverse.getPreferredConfiguration(SimpleUniverse.java:368)
        at ptolemy.domains.gr.lib.ViewScreen3D._createViewScreen(ViewScreen3D.java:502)
        at ptolemy.domains.gr.lib.ViewScreen3D.initialize(ViewScreen3D.java:284)

https://stackoverflow.com/questions/12738469/java3d-not-working-on-mac-mountain-lion - "I'm afraid that Java3D 1.5 is incompatible with newer versions of OSX, there's nothing you can do." The poster did post jars that might work with Java 1.6, but not Java 1.8?

Looking at the Java 3D installation instructions, it looks like I need to install Jogl. I did that and this command:


export DYLD_LIBRARY_PATH=/Users/cxh/ptII/vendors/jogl/jogamp-all-platforms/lib/macosx-universal:${DYLD_LIBRARY_PATH}

export JAVA3D_EXT=${PTII}/vendors/j3d/j3d-1_5_2-macosx/lib/ext
export JOGL_JAR=${PTII}/vendors/jogl/jogamp-all-platforms/jar

java -classpath \
${JAVA3D_EXT}/j3dcore.jar:${JAVA3D_EXT}/j3dutils.jar:${JAVA3D_EXT}/vecmath.jar:${JOGL_JAR}/jogl-all.jar:${JOGL_JAR}/\
gluegen.jar:${PTII}
ptolemy.vergil.VergilApplication $PTII/ptolemy/domains/gr/demo/Pendulum/Pendulum.xml

fails with:

ptolemy.kernel.util.IllegalActionException:   in .Pendulum.manager
Because:
javax/media/opengl/AbstractGraphicsDevice
        at ptolemy.actor.Manager.execute(Manager.java:488)
        at ptolemy.actor.Manager.run(Manager.java:1202)
        at ptolemy.actor.Manager$PtolemyRunThread.run(Manager.java:1807)
Caused by: java.lang.NoClassDefFoundError: javax/media/opengl/AbstractGraphicsDevice
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:259)
        at javax.media.j3d.Pipeline$1.run(Pipeline.java:162)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.media.j3d.Pipeline.createPipeline(Pipeline.java:157)
        at javax.media.j3d.MasterControl.loadLibraries(MasterControl.java:965)
        at javax.media.j3d.VirtualUniverse.<clinit>(VirtualUniverse.java:299)
        at javax.media.j3d.GroupRetained.<init>(GroupRetained.java:161)
        at javax.media.j3d.Group.createRetained(Group.java:94)
        at javax.media.j3d.SceneGraphObject.<init>(SceneGraphObject.java:119)
        at javax.media.j3d.Node.<init>(Node.java:178)
        at javax.media.j3d.Group.<init>(Group.java:556)
        at com.sun.j3d.utils.geometry.Primitive.<init>(Primitive.java:140)
        at com.sun.j3d.utils.geometry.Sphere.<init>(Sphere.java:191)
        at ptolemy.domains.gr.lib.Sphere3D._createModel(Sphere3D.java:164)
        at ptolemy.domains.gr.lib.GRShadedShape.initialize(GRShadedShape.java:335)
        at ptolemy.actor.Director.initialize(Director.java:948)
        at ptolemy.actor.Director.initialize(Director.java:917)
        at ptolemy.actor.sched.StaticSchedulingDirector.initialize(StaticSchedulingDirector.java:159)
        at ptolemy.domains.gr.kernel.GRDirector.initialize(GRDirector.java:289)
        at ptolemy.actor.CompositeActor.initialize(CompositeActor.java:915)
        at ptolemy.actor.Manager.initialize(Manager.java:674)
        at ptolemy.actor.Manager.execute(Manager.java:344)
        ... 2 more
Caused by: java.lang.ClassNotFoundException: javax.media.opengl.AbstractGraphicsDevice
        at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 25 more
Caused by: java.lang.NoClassDefFoundError: javax/media/opengl/AbstractGraphicsDevice
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:259)
        at javax.media.j3d.Pipeline$1.run(Pipeline.java:162)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.media.j3d.Pipeline.createPipeline(Pipeline.java:157)
        at javax.media.j3d.MasterControl.loadLibraries(MasterControl.java:965)
        at javax.media.j3d.VirtualUniverse.<clinit>(VirtualUniverse.java:299)
        at javax.media.j3d.GroupRetained.<init>(GroupRetained.java:161)
        at javax.media.j3d.Group.createRetained(Group.java:94)
        at javax.media.j3d.SceneGraphObject.<init>(SceneGraphObject.java:119)
        at javax.media.j3d.Node.<init>(Node.java:178)
        at javax.media.j3d.Group.<init>(Group.java:556)
        at com.sun.j3d.utils.geometry.Primitive.<init>(Primitive.java:140)
        at com.sun.j3d.utils.geometry.Sphere.<init>(Sphere.java:191)
        at ptolemy.domains.gr.lib.Sphere3D._createModel(Sphere3D.java:164)
        at ptolemy.domains.gr.lib.GRShadedShape.initialize(GRShadedShape.java:335)
        at ptolemy.actor.Director.initialize(Director.java:948)
        at ptolemy.actor.Director.initialize(Director.java:917)
        at ptolemy.actor.sched.StaticSchedulingDirector.initialize(StaticSchedulingDirector.java:159)
        at ptolemy.domains.gr.kernel.GRDirector.initialize(GRDirector.java:289)
        at ptolemy.actor.CompositeActor.initialize(CompositeActor.java:915)
        at ptolemy.actor.Manager.initialize(Manager.java:674)
        at ptolemy.actor.Manager.execute(Manager.java:344)
        at ptolemy.actor.Manager.run(Manager.java:1202)
        at ptolemy.actor.Manager$PtolemyRunThread.run(Manager.java:1807)
Caused by: java.lang.ClassNotFoundException: javax.media.opengl.AbstractGraphicsDevice
        at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 25 more
 
bash-3.2$ export DYLD_LIBRARY_PATH=/Users/cxh/ptII/vendors/jogl/jogamp-all-platforms/lib/macosx-universal:${DYLD_LIBRARY_PATH}
bash-3.2$ export JAVA3D_EXT=${PTII}/vendors/j3d/j3d-1_5_2-macosx/lib/ext
bash-3.2$ export JOGL_JAR=${PTII}/vendors/jogl/jogamp-all-platforms/jar
bash-3.2$ java -version
java version "1.8.0_20"
Java(TM) SE Runtime Environment (build 1.8.0_20-b26)
Java HotSpot(TM) 64-Bit Server VM (build 25.20-b23, mixed mode)
bash-3.2$ javac -classpath ${JAVA3D_EXT}/j3dcore.jar:${JAVA3D_EXT}/j3dutils.jar:${JAVA3D_EXT}/vecmath.jar:${JOGL_JAR}/jogl-all.jar:${JOGL_JAR}/gluegen.jar:${JOGL_JAR}/joal.jar:${PTII} PyramidExample.java
warning: Supported source version 'RELEASE_6' from annotation processor 'com.jogamp.gluegen.structgen.CStructAnnotationProcessor' less than -source '1.8'
1 warning
bash-3.2$ java -classpath ${JAVA3D_EXT}/j3dcore.jar:${JAVA3D_EXT}/j3dutils.jar:${JAVA3D_EXT}/vecmath.jar:${JOGL_JAR}/jogl-all.jar:${JOGL_JAR}/gluegen.jar:${JOGL_JAR}/joal.jar:${PTII} PyramidExample
Exception in thread "main" java.lang.NoClassDefFoundError: javax/media/opengl/AbstractGraphicsDevice
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:259)
        at javax.media.j3d.Pipeline$1.run(Pipeline.java:162)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.media.j3d.Pipeline.createPipeline(Pipeline.java:157)
        at javax.media.j3d.MasterControl.loadLibraries(MasterControl.java:965)
        at javax.media.j3d.VirtualUniverse.<clinit>(VirtualUniverse.java:299)
        at PyramidExample.main(PyramidExample.java:13)
Caused by: java.lang.ClassNotFoundException: javax.media.opengl.AbstractGraphicsDevice
        at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 8 more
bash-3.2$

AbstractGraphicsDevice is not in the Java3D 1.5.2 source from https://java3d.java.net/binary-builds.html (http://download.java.net/media/java3d/builds/release/1.5.2/j3d-1_5_2-src.zip)

bash-3.2$ mkdir tmp
bash-3.2$ cd tmp
bash-3.2$ unzip ../j3d-1_5_2-macosx/lib/ext/j3dcore.jar
Archive: ../j3d-1_5_2-macosx/lib/ext/j3dcore.jar
inflating: META-INF/MANIFEST.MF
inflating: META-INF/SUN_MICR.SF
...
bash-3.2$ find . -type f | xargs grep AbstractGraphicsDevice
Binary file ./javax/media/j3d/JoglPipeline$QueryCanvas.class matches
Binary file ./javax/media/j3d/JoglPipeline.class matches

However, -Dj3d.rend=noop helps?

bash-3.2$ java -Dj3d.rend=noop -classpath ${JAVA3D_EXT}/j3dcore.jar:${JAVA3D_EXT}/j3dutils.jar:${JAVA3D_EXT}/vecmath\
.jar:${JOGL_JAR}/jogl-all.jar:${JOGL_JAR}/gluegen.jar:${JOGL_JAR}/joal.jar:${PTII} PyramidExample
NoopPipeline.getGraphicsConfig()
NoopDrawingSurfaceObject constructed
NoopDrawingSurfaceObject.getDrawingSurfaceObjectInfo: window = null

Solution:

To restate the problem, compiling the example at http://www.java3d.org/samples.html fails for me under Mac OS 10.7 with Java 1.8.

Get Java 3D:

wget http://download.java.net/media/java3d/builds/release/1.5.2/j3d-1_5_2-macosx.zip
unzip j3d-1_5_2-macosx.zip
cd j3d-1_5_2-macosx/
unzip j3d-jre.zip

Get Jogl:

wget http://jogamp.org/deployment/v2.2.4/archive/jogamp-all-platforms.7z
7z x jogamp-all-platforms.7z

Get the sample Java3D test PyramidExample.java from http://www.java3d.org/samples.html

// From http://www.java3d.org/samples.html                                                                          
import java.awt.Color;                                                                                              
import com.sun.j3d.utils.geometry.GeometryInfo;                                                                      
import com.sun.j3d.utils.geometry.NormalGenerator;                                                                  
import com.sun.j3d.utils.universe.SimpleUniverse;                                                                    
import javax.media.j3d.*;                                                                                            
import javax.vecmath.*;                                                                                              

// An Egyptian pyramid                                                                                              
// Base divided into two triangles                                                                                  

public class PyramidExample {                                                                                        
    public static void main(String[] args) {                                                                        
        SimpleUniverse universe = new SimpleUniverse();                                                              
        BranchGroup group = new BranchGroup();                                                                      

        Point3f e = new Point3f(1.0f, 0.0f, 0.0f); // east                                                          
        Point3f s = new Point3f(0.0f, 0.0f, 1.0f); // south                                                          
        Point3f w = new Point3f(-1.0f, 0.0f, 0.0f); // west                                                          
        Point3f n = new Point3f(0.0f, 0.0f, -1.0f); // north                                                        
        Point3f t = new Point3f(0.0f, 0.721f, 0.0f); // top                                                          

        TriangleArray pyramidGeometry = new TriangleArray(18,                                                        
                TriangleArray.COORDINATES);                                                                          
        pyramidGeometry.setCoordinate(0, e);                                                                        
        pyramidGeometry.setCoordinate(1, t);                                                                        
        pyramidGeometry.setCoordinate(2, s);                                                                        

        pyramidGeometry.setCoordinate(3, s);                                                                        
        pyramidGeometry.setCoordinate(4, t);                                                                        
        pyramidGeometry.setCoordinate(5, w);                                                                        

        pyramidGeometry.setCoordinate(6, w);                                                                        
        pyramidGeometry.setCoordinate(7, t);                                                                        
        pyramidGeometry.setCoordinate(8, n);                                                                        

        pyramidGeometry.setCoordinate(9, n);                                                                        
        pyramidGeometry.setCoordinate(10, t);                                                                        
        pyramidGeometry.setCoordinate(11, e);                                                                        

        pyramidGeometry.setCoordinate(12, e);                                                                        
        pyramidGeometry.setCoordinate(13, s);                                                                        
        pyramidGeometry.setCoordinate(14, w);                                                                        

        pyramidGeometry.setCoordinate(15, w);                                                                        
        pyramidGeometry.setCoordinate(16, n);                                                                        
        pyramidGeometry.setCoordinate(17, e);                                                                        
        GeometryInfo geometryInfo = new GeometryInfo(pyramidGeometry);                                              
        NormalGenerator ng = new NormalGenerator();                                                                  
        ng.generateNormals(geometryInfo);                                                                            

        GeometryArray result = geometryInfo.getGeometryArray();                                                      

        // yellow appearance                                                                                        
        Appearance appearance = new Appearance();                                                                    
        Color3f color = new Color3f(Color.yellow);                                                                  
        Color3f black = new Color3f(0.0f, 0.0f, 0.0f);                                                              
        Color3f white = new Color3f(1.0f, 1.0f, 1.0f);                                                              
        Texture texture = new Texture2D();                                                                          
        TextureAttributes texAttr = new TextureAttributes();                                                        
        texAttr.setTextureMode(TextureAttributes.MODULATE);                                                          
        texture.setBoundaryModeS(Texture.WRAP);                                                                      
        texture.setBoundaryModeT(Texture.WRAP);                                                                      
        texture.setBoundaryColor(new Color4f(0.0f, 1.0f, 0.0f, 0.0f));                                              
        Material mat = new Material(color, black, color, white, 70f);                                                
        appearance.setTextureAttributes(texAttr);                                                                    
        appearance.setMaterial(mat);                                                                                
        appearance.setTexture(texture);                                                                              
        Shape3D shape = new Shape3D(result, appearance);                                                            
        group.addChild(shape);                                                                                      

        // above pyramid                                                                                            
        Vector3f viewTranslation = new Vector3f();                                                                  
        viewTranslation.z = 3;                                                                                      
        viewTranslation.x = 0f;                                                                                      
        viewTranslation.y = .3f;                                                                                    
        Transform3D viewTransform = new Transform3D();                                                              
        viewTransform.setTranslation(viewTranslation);                                                              
        Transform3D rotation = new Transform3D();                                                                    
        rotation.rotX(-Math.PI / 12.0d);                                                                            
        rotation.mul(viewTransform);                                                                                
        universe.getViewingPlatform().getViewPlatformTransform().setTransform(                                      
                rotation);                                                                                          
        universe.getViewingPlatform().getViewPlatformTransform().getTransform(                                      
                viewTransform);                                                                                      

        // lights                                                                                                    
        BoundingSphere bounds = new BoundingSphere(new Point3d(0.0, 0.0, 0.0),                                      
                1000.0);                                                                                            
        Color3f light1Color = new Color3f(.7f, .7f, .7f);                                                            
        Vector3f light1Direction = new Vector3f(4.0f, -7.0f, -12.0f);                                                
        DirectionalLight light1 = new DirectionalLight(light1Color, light1Direction);                                
        light1.setInfluencingBounds(bounds);                                                                        
        group.addChild(light1);                                                                                      
        Color3f ambientColor = new Color3f(.4f, .4f, .4f);                                                          
        AmbientLight ambientLightNode = new AmbientLight(ambientColor);                                              
        ambientLightNode.setInfluencingBounds(bounds);                                                              
        group.addChild(ambientLightNode);                                                                            

        universe.addBranchGraph(group);                                                                              
    }                                                                                                                
}        
 

Compile:

export DYLD_LIBRARY_PATH=`pwd`/jogamp-all-platforms/lib/macosx-universal
export JAVA3D_EXT=`pwd`/j3d-1_5_2-macosx/lib/ext
export JOGL_JAR=`pwd`/jogamp-all-platforms/jar

javac -classpath ${JAVA3D_EXT}/j3dcore.jar:${JAVA3D_EXT}/j3dutils.jar:${JAVA3D_EXT}/vecmath.jar:${JOGL_JAR}/jogl-all\.jar:${JOGL_JAR}/gluegen.jar:${JOGL_JAR}/joal.jar:. PyramidExample.java
 

Attempt to run:

bash-3.2$ java -classpath ${JAVA3D_EXT}/j3dcore.jar:${JAVA3D_EXT}/j3dutils.jar:${JAVA3D_EXT}/vecmath.jar:${JOGL_JAR}\
/jogl-all.jar:${JOGL_JAR}/gluegen.jar:${JOGL_JAR}/joal.jar:. PyramidExample
Exception in thread "main" java.lang.NoClassDefFoundError: javax/media/opengl/GLCapabilitiesChooser
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:455)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:367)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:259)
        at javax.media.j3d.Pipeline$1.run(Pipeline.java:162)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.media.j3d.Pipeline.createPipeline(Pipeline.java:157)
        at javax.media.j3d.MasterControl.loadLibraries(MasterControl.java:965)
        at javax.media.j3d.VirtualUniverse.<clinit>(VirtualUniverse.java:299)
        at PyramidExample.main(PyramidExample.java:13)
Caused by: java.lang.ClassNotFoundException: javax.media.opengl.GLCapabilitiesChooser
        at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 20 more
bash-3.2$

Rebuilding Java 3D for Mac OS and Java 1.8

Note that $PTII/vendors/j3d has Java 3D jars build as below

Download and build a new version of Java3D, see http://forum.jogamp.org/NoClassDefFoundError-GLCapabilitiesChooser-on-OS-X-Snow-Leopard-and-Java-1-6-td4008344.html#a4020428

mkdir j3d
(cd j3d; git clone https://github.com/hharrison/vecmath.git)
(cd j3d/vecmath; ant)
(cd j3d; git clone https://github.com/hharrison/java3d-core.git)
(cd j3d;git clone https://github.com/hharrison/java3d-utils.git)
ln -s jogamp-all-platforms/jar jogl-v2.2.0
(cd j3d; ln -s java3d-utils j3dutils)

Run using the new Java3D:

export JAVA3D_EXT=`pwd`/j3d/java3d-core/build/jars
java -classpath ${JAVA3D_EXT}/j3dcore.jar:${JAVA3D_EXT}/j3dutils.jar:j3d/vecmath/build/jars/vecmath.jar:${JOGL_JAR}/jogl-all.jar:${JOGL_JAR}/gluegen.jar:${JOGL_JAR}/joal.jar:. PyramidExample

It works!

Install Java 3D for Mac and Ptolemy II (JDK1.8)

This is the old way of installing Java3D, see Install Java 3D for Mac and Ptolemy II (JDK10) above.

The solution is to build a special version from http://forum.jogamp.org/NoClassDefFoundError-GLCapabilitiesChooser-on-OS-X-Snow-Leopard-and-Java-1-6-td4008344.html#a4020428

The http://chess.eecs.berkeley.edu/ptexternal Ptolemy II svn tree includes the above special version of Java 3D in $PTII/vendors/j3d. Jogl must be installed as follows

  1. Install Mac Ports, see https://www.macports.org
  2. Install 7z: sudo port install p7zip
  3. Download and install Jogl:
    mkdir -p $PTII/vendors/jogl
    cd $PTI/vendors/jogl
    wget http://jogamp.org/deployment/v2.2.4/archive/jogamp-all-platforms.7z
    7z x jogamp-all-platforms.7z
  4. Reconfigure:
    cd $PTII
    ./configure

AWT not found

Under Mac OS X with Java 1.8, if you get a message on standard out like:

bash-3.2$ $PTII/bin/vergil ptolemy/domains/gr/demo/Pendulum/Pendulum.xml
JavaVM WARNING: JAWT_GetAWT must be called after loading a JVM
AWT not found
126 ms. Memory: 190464K Free: 165591K (87%)

Then the problem is likely that an older version of Java 3D is installed in /Systems/Library/Java/Extensions. The solution is to remove Java 3D from that location with:

sudo rm /System/Library/Java/Extensions/{*J3D*,*j3d*}

Under El Capitan, the OS has been "upgraded" so that removing files from /System will fail. (lame)

bash-3.2$ sudo rm /System/Library/Java/Extensions/{*J3D*,*j3d*}
Password:
override rwxr-xr-x  root/wheel restricted,compressed for /System/Library/Java/Extensions/libJ3D.jnilib? y
rm: /System/Library/Java/Extensions/libJ3D.jnilib: Operation not permitted
override rwxr-xr-x  root/wheel restricted,compressed for /System/Library/Java/Extensions/libJ3DAudio.jnilib? y
rm: /System/Library/Java/Extensions/libJ3DAudio.jnilib: Operation not permitted
override rwxr-xr-x  root/wheel restricted,compressed for /System/Library/Java/Extensions/libJ3DUtils.jnilib? y
rm: /System/Library/Java/Extensions/libJ3DUtils.jnilib: Operation not permitted
override rw-r--r--  root/wheel restricted for /System/Library/Java/Extensions/j3daudio.jar? y
rm: /System/Library/Java/Extensions/j3daudio.jar: Operation not permitted
override rw-r--r--  root/wheel restricted for /System/Library/Java/Extensions/j3dcore.jar? y
rm: /System/Library/Java/Extensions/j3dcore.jar: Operation not permitted
override rw-r--r--  root/wheel restricted for /System/Library/Java/Extensions/j3dutils.jar? y
rm: /System/Library/Java/Extensions/j3dutils.jar: Operation not permitted
bash-3.2$

This is because of the "Rootless" feature, see http://apple.stackexchange.com/questions/193368/what-is-the-rootless-feature-in-el-capitan-really

To remove these files, see http://apple.stackexchange.com/questions/208478/how-do-i-disable-system-integrity-protection-sip-aka-rootless-on-os-x-10-11/209530#209530

This requires rebooting twice:

  1. Reboot by restarting and holding down Command+R until the Apple logo appears
  2. Click on Utilities -> Terminals and run csrutil disable
  3. Reboot
  4. Login, start a terminal, run sudo rm /System/Library/Java/Extensions/{*J3D*,*j3d*}
  5. Reconfigure and build: cd $PTII;./configure; ant build build-bin. Note that you have not yet done so, you will need to install Jogl.
  6. Verify that Java3D runs: $PTII/bin/vergil ptolemy/domains/gr/demo/Pendulum/Pendulum.xml
  7. Reboot by restarting and holding down Command+R until the Apple logo appears
  8. Click on Utilities -> Terminals and run csrutil enable
  9. Reboot
  • Apparently, Java3D is shipped with the JDK 1.6 that was shipped by Apple. /System/Library/JavaExtensions has various files: (j3daudio.jar, j3dcore.jar, j3dutilities.jar and jnilibs)

Can't load library: /System/Library/Frameworks/gluegen-rt.Framework/gluegen-rt

Under Mac OS X El Capitan, after rebooting in recovery mode and running csrutil disable and rebooting, I was able to run

  $PTII/bin/vergil ptolemy/domains/gr/demo/Pendulum/Pendulum.xml

However, after rebooting in recovery mode, running csrutil enable and rebooting, when I ran

  $PTII/bin/vergil ptolemy/domains/gr/demo/Pendulum/Pendulum.xml
Can't load library: /System/Library/Frameworks/gluegen-rt.Framework/gluegen-rt
        at ptolemy.domains.gr.lib.GRShadedShape.initialize(GRShadedShape.java:338)

The fix was to add vendors/jogl/jogamp-all-platforms/jar/gluegen-rt-natives-macosx-universal.jar to the classpath.

Eclipse fails with: references non existing library '/System/Library/Java/Extensions/j3daudio.jar'

After removing the jars in question, rerunning configure and refreshing the ptII project in Eclipse, the following error appeared

Description Resource Path Location Type
The container 'JRE System Library [jdk1.8.0_65]' references non existing library '/System/Library/Java/Extensions/j3daudio.jar' ptII Build path Build Path Problem

The fix is to

  1. In Eclipse, find the JRE with: Eclipse -> Preferences -> Java -> Installed JREs
  2. Click on Edit
  3. Click on the offending jar file
  4. Click on Remove
  5. Repeat until all the missing jar files are gone.

Another solution is to install a new JDK and tell Eclipse about it via Eclipse -> Preferences -> Java -> Installed JREs

Mac Java 1.6 from the command line with the ptII devel head: Works!

  • Java 1.6.0_26 works with a Ptolemy II Java3D
bash-3.2$ java -version
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03-383-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02-383, mixed mode)
bash-3.2$ java -classpath $PTII ptolemy.vergil.VergilApplication $PTII/ptolemy/domains/ddf/demo/HanoiTower/HanoiTower.xml

Mac Java 1.6 WebStart ptII8.0.1: Fails

com.sun.deploy.net.JARSigningException: Found unsigned entry in resource: http://download.java.net/media/java3d/webstart/release/j3d/1.5.2/j3dcore.jar
at com.sun.javaws.security.SigningInfo.getCommonCodeSignersForJar(SigningInfo.java:407)
at com.sun.javaws.security.SigningInfo.check(SigningInfo.java:277)
at com.sun.javaws.LaunchDownload.checkSignedResourcesHelper(LaunchDownload.java:1764)
at com.sun.javaws.LaunchDownload.checkSignedResources(LaunchDownload.java:1527)
at com.sun.javaws.Launcher.prepareResources(Launcher.java:1283)
at com.sun.javaws.Launcher.prepareAllResources(Launcher.java:636)
at com.sun.javaws.Launcher.prepareToLaunch(Launcher.java:338)
at com.sun.javaws.Launcher.prepareToLaunch(Launcher.java:238)
at com.sun.javaws.Launcher.launch(Launcher.java:127)
at com.sun.javaws.Main.launchApp(Main.java:460)
at com.sun.javaws.Main.continueInSecureThread(Main.java:292)
at com.sun.javaws.Main$1.run(Main.java:125)
at java.lang.Thread.run(Thread.java:695)

This is because the Ptolemy II 8.0.1 HanoiTower.jnlp file uses the java.net java3d JNLP files which are not signed

Mac Java 1.6 WebStart ptII devel head: fails

ava.security.cert.CertificateException: java.security.cert.CertPathValidatorException: java.security.InvalidKeyException: Wrong key usage
at com.sun.deploy.security.TrustDecider.isAllPermissionGranted(TrustDecider.java:715)
at com.sun.javaws.security.AppPolicy.grantUnrestrictedAccess(AppPolicy.java:295)
at com.sun.javaws.LaunchDownload.checkSignedResourcesHelper(LaunchDownload.java:1851)
at com.sun.javaws.LaunchDownload.checkSignedResources(LaunchDownload.java:1527)
at com.sun.javaws.Launcher.prepareResources(Launcher.java:1283)
at com.sun.javaws.Launcher.prepareAllResources(Launcher.java:636)
at com.sun.javaws.Launcher.prepareToLaunch(Launcher.java:338)
at com.sun.javaws.Launcher.prepareToLaunch(Launcher.java:210)
at com.sun.javaws.Launcher.launch(Launcher.java:127)
at com.sun.javaws.Main.launchApp(Main.java:460)
at com.sun.javaws.Main.continueInSecureThread(Main.java:292)
at com.sun.javaws.Main$1.run(Main.java:125)
at java.lang.Thread.run(Thread.java:695)
Caused by: java.security.cert.CertPathValidatorException: java.security.InvalidKeyException: Wrong key usage
at sun.security.provider.certpath.OCSPResponse.verifyResponse(OCSPResponse.java:456)
at sun.security.provider.certpath.OCSPResponse.<init>(OCSPResponse.java:411)
at sun.security.provider.certpath.OCSP.check(OCSP.java:216)
at sun.security.provider.certpath.OCSP.check(OCSP.java:120)
at com.sun.deploy.security.TrustDecider.doOCSPEEValidation(TrustDecider.java:1002)
at com.sun.deploy.security.TrustDecider.isAllPermissionGranted(TrustDecider.java:696)
... 12 more
Caused by: java.security.InvalidKeyException: Wrong key usage
at java.security.Signature.initVerify(Signature.java:459)
at sun.security.provider.certpath.OCSPResponse.verifyResponse(OCSPResponse.java:440)
... 17 more

Presumably, this is because something changed between Java 1.6 and 1.8.

http://bugs.java.com/bugdatabase/view_bug.do?bug_id=7197652 has the same stack trace

https://community.oracle.com/message/10753282 suggests: "As a workaround, users can disable "Enable online certificate validation" in the Java Control Panel -> Advanced -> Security -> General section. Note that this workaround seems to conflict with a workaround mentioned for getting JNLP applets to work (http://www.java.net/forum/topic/jdk/java-se-snapshots-project-feedback/os-x-jdk-7u6-will-not-run-signed-jnlp-apps)."

However, the Java Control Panel seems to control Java 8?

I tried:

java -classpath /Library/Java/JavaVirtualMachines/1.6.0_26-b03-383.jdk/Contents/Home/lib/deploy.jar com.sun.deploy.panel.ControlPanel

and got a control panel that seemed to let me set the order of JVMs, but it did not have settings to change online certificate validation.

It looks like one of the "upgrades" removed the control panel for JDK 1.6.0. Seems like a significant bug.

Mac Java 1.6 ptII head works with a self signed certificate.

In ptolemy/copernicus/applet/makefile, changing

-ptIILocalURL "file:///Users/cxh/ptII/" \

and then running

make MODEL=HanoiTower MODELPATH=/Users/cxh/ptII/ptolemy/domains/ddf/demo/HanoiTower/HanoiTower.xml TARGETPATH=ptolemy/domains/ddf/demo/HanoiTower jnlpUpdateDemo

worked if and only if AppletWriter.java was not including the j3d extension signed with our certificate:

// Given a jar file, return the appropriate <extension .../> string, if any.
private static String _checkForJNLPExtensions(String jarFileName) {
StringBuffer result = new StringBuffer();
if (jarFileName.contains("ptolemy/actor/lib/jai/jai.jar")) {
result.append(" <extension href=\"http://download.java.net/media/jai-imageio/webstart/release/jai-imageio-1.1-latest.jnlp\"/>\n");
}
if (jarFileName.contains("ptolemy/actor/lib/jmf/jmf.jar")) {
result.append("<jar href=\"http://cvs588.gsfc.nasa.gov/WebStartiliads/dev/lib/jmf/JMF-2.1.1e/lib/customizer.jar\"/>\n <jar href=\"http://cvs\
588.gsfc.nasa.gov/WebStartiliads/dev/lib/jmf/JMF-2.1.1e/lib/jmf.jar\"/>\n <jar href=\"http://cvs588.gsfc.nasa.gov/WebStartiliads/dev/lib/jmf/JMF-2.1.1e/\
lib/mediaplayer.jar\"/>\n <jar href=\"http://cvs588.gsfc.nasa.gov/WebStartiliads/dev/lib/jmf/JMF-2.1.1e/lib/multiplayer.jar\"/>\n");
}
// if (jarFileName.contains("ptolemy/domains/gr/gr.jar")) {
// result.append(" <extension href=\"http://ptolemy.org/ptolemyII/java3d/java3d-1.5.0.jnlp\"/>\n");
// }
return result.toString();
}

This indicates that the problem is with our cert?

https://community.oracle.com/message/10753282 says:

"..and a followup: DigiCert now has a workaround available: they can issue a new code signing certificate with intermediates that have the "DigitalSignature" flag set in the "KeyUsage" section (apparently Java expects all certificates in the chain to have this DigitalSignature flag when OCSP is enabled)

This should be doable by any other provider as well. You can check the flags in your chain with e.g. keytool -list -v -alias ... -keystore ... "

http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/7-b147/java/security/Signature.java#Signature.initVerify%28java.security.cert.Certificate%29 has:

public final void [More ...] initVerify(Certificate certificate)
throws InvalidKeyException {
// If the certificate is of type X509Certificate,
// we should check whether it has a Key Usage
// extension marked as critical.
if (certificate instanceof java.security.cert.X509Certificate) {
// Check whether the cert has a key usage extension
// marked as a critical extension.
// The OID for KeyUsage extension is 2.5.29.15.
X509Certificate cert = (X509Certificate)certificate;
Set<String> critSet = cert.getCriticalExtensionOIDs();
if (critSet != null && !critSet.isEmpty()
&& critSet.contains("2.5.29.15")) {
boolean[] keyUsageInfo = cert.getKeyUsage();
// keyUsageInfo[0] is for digitalSignature.
if ((keyUsageInfo != null) && (keyUsageInfo[0] == false))
throw new InvalidKeyException("Wrong key usage");
}
}
PublicKey publicKey = certificate.getPublicKey();
engineInitVerify(publicKey);
state = VERIFY;
}

Running

"/Library/Java/JavaVirtualMachines/1.6.0_26-b03-383.jdk/Contents/Home/bin/keytool" -list -v \
-keystore "/users/ptII/adm/certs/ptkeystore" \
-storepass xxx

Shows that our cert has:

#1: ObjectId: 2.5.29.15 Criticality=true
KeyUsage [
DigitalSignature
]

But the next cert in the chain has:

1: ObjectId: 2.5.29.15 Criticality=true
KeyUsage [
Key_CertSign
Crl_Sign
]

Java test file

package ptolemy.actor.lib.security.test;

import java.io.InputStream;
import java.net.URL;
import java.security.KeyStore;
import java.security.PublicKey;
import java.security.Signature;
import java.security.cert.Certificate;
import java.security.cert.X509Certificate;
import sun.security.x509.X509CertImpl;
import sun.security.util.ObjectIdentifier;

/** Run an OSP Check on a key.                                                                                                                              
 *  This fails under Java 1.6 on the Mac.                                                                                                                  
 *  See the Usage text below and http://chess.eecs.berkeley.edu/ptexternal/wiki/Main/Java3D                                                                
 *  @author  Christopher Brooks                                                                                                                            
 *  @version $Id: KeyReader.java 65763 2013-03-07 01:54:37Z cxh $                                                                                          
 *  @since Ptolemy II 10.0                                                                                                                                  
 *  @Pt.ProposedRating Red (cxh)                                                                                                                            
 *  @Pt.AcceptedRating Red (cxh)                                                                                                                            
 */

public class KeyUsageTest {
    /** Open a keystore using the password from the command line.                                                                                          
     *  @exception If there is a problem opening the keystore.                                                                                              
     */

    public static void main(String []args) throws Exception {
        if (args.length != 1) {
            System.out.println("Usage: javac -classpath $PTII KeyUsageTest.java;"
                    + "java -classpath $PTII ptolemy.actor.lib.security.test.KeyUsageTest PASSEWORD");
        }
        String path = "file:///users/ptII/adm/certs/ptkeystore";
        //String path = "file:///Volumes/cxhSecure4/certs/codeSigningCertMay2014.p12";                                                                      
        //String path = "file:///Users/cxh/ptII/ptolemy/actor/lib/security/test/keystore.jks";                                                              
        InputStream keyStoreInputStream = new URL(path).openStream();

        KeyStore keyStore = KeyStore.getInstance("JKS");
        keyStore.load(keyStoreInputStream, args[0].toCharArray());

        String alias = "ptolemy";
        Certificate certificate = keyStore.getCertificate(alias);

        Certificate[] chain = keyStore.getCertificateChain(alias);

        System.out.println("Set of critical extensions for certificate: 0");
        certificateExtensions((X509Certificate)chain[0]);

        System.out.println("Set of critical extensions for certificate: 1");
        certificateExtensions((X509Certificate)chain[1]);

        sun.security.provider.certpath.OCSP.check((X509Certificate)chain[0], (X509Certificate)chain[1]);
    }

    /** Print out the certificate extensions.                                                                                                              
     */

    public static void certificateExtensions(X509Certificate x509cert) throws Exception {
        // Code below based on Sun's keystore code.                                                                                                        
        java.util.Set<String> critSet = x509cert.getCriticalExtensionOIDs();
        if (critSet != null && !critSet.isEmpty()) {
            for (String oid : critSet) {
                System.out.println(oid);
                int extnum = 0;
                if (x509cert instanceof X509CertImpl) {
                    X509CertImpl impl = (X509CertImpl)x509cert;
                    if (x509cert.getCriticalExtensionOIDs() != null) {
                        for (String extOID : x509cert.getCriticalExtensionOIDs()) {
                            if (extnum == 0) {
                                System.out.println();
                                System.out.println("Extensions: ");
                                System.out.println();
                            }
                            System.out.println("#"+(++extnum)+": "+
                                    impl.getExtension(new ObjectIdentifier(extOID)));
                        }
                    }
                }
            }
        }
    }
}

Sample run:

bash-3.2$ java -version
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)
bash-3.2$ which java
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java
bash-3.2$ javac -classpath $PTII KeyUsageTest.java; java -classpath $PTII ptolemy.actor.lib.security.test.KeyUsageTest xxxxx
Set of critical extensions for certificate: 0
2.5.29.15

Extensions:

#1: ObjectId: 2.5.29.15 Criticality=true
KeyUsage [
DigitalSignature
]

#2: ObjectId: 2.5.29.19 Criticality=true
BasicConstraints:[
CA:false
PathLen: undefined
]

2.5.29.19

Extensions:

#1: ObjectId: 2.5.29.15 Criticality=true
KeyUsage [
DigitalSignature
]

#2: ObjectId: 2.5.29.19 Criticality=true
BasicConstraints:[
CA:false
PathLen: undefined
]

Set of critical extensions for certificate: 1
2.5.29.15

Extensions:

#1: ObjectId: 2.5.29.15 Criticality=true
KeyUsage [
Key_CertSign
Crl_Sign
]

#2: ObjectId: 2.5.29.19 Criticality=true
BasicConstraints:[
CA:true
PathLen:0
]

2.5.29.19
Extensions:

#1: ObjectId: 2.5.29.15 Criticality=true
KeyUsage [
Key_CertSign
Crl_Sign
]

#2: ObjectId: 2.5.29.19 Criticality=true
BasicConstraints:[
CA:true
PathLen:0
]

Exception in thread "main" java.security.cert.CertPathValidatorException: java.security.InvalidKeyException: Wrong key usage
at sun.security.provider.certpath.OCSPResponse.verifyResponse(OCSPResponse.java:456)
at sun.security.provider.certpath.OCSPResponse.<init>(OCSPResponse.java:411)
at sun.security.provider.certpath.OCSP.check(OCSP.java:216)
at sun.security.provider.certpath.OCSP.check(OCSP.java:85)
at ptolemy.actor.lib.security.test.KeyUsageTest.main(KeyUsageTest.java:36)
Caused by: java.security.InvalidKeyException: Wrong key usage
at java.security.Signature.initVerify(Signature.java:459)
at sun.security.provider.certpath.OCSPResponse.verifyResponse(OCSPResponse.java:440)
... 4 more

/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/bin/java -classpath $PTII ptolemy.actor.lib.security.test.KeyUsageTest xxxxx works just fine.

setting the deployment properties.

https://www.java.net/forum/topic/jdk/java-se-snapshots-project-feedback/os-x-jdk-7u6-will-not-run-signed-jnlp-apps states:

It seems on MacOS, OCSP validation should be explicitly enabled with deployment.properties entry:
deployment.security.validation.ocsp=true
or using Java control panel System Preferences > Other > Java > Advanced > "Enable online certificate validation".

http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/jcp/properties.html says that for the Oracle JVM (not the Apple 1.6 JVM), Mac OS X ~/Library/Application Support/Oracle/Java/Deployment/deployment.properties

/Users/cxh/Library/Caches/Java/deployment.properties contains:

#deployment.properties
#Wed May 07 09:02:40 PDT 2014
deployment.apple.java10.6.u7=true
deployment.javaws.splash.index=/Users/cxh/Library/Caches/Java/cache/6.0/splash/splash.xml
deployment.version=6.0
deployment.security.TLSv1=true
# Java on Mac OS X does not maintain an installed JRE list in this file.
# Use /usr/libexec/java_home to obtain a $JAVA_HOME path.

However, that file seems to get updated each time javaws or com.sun.javaws.Main is run.

Running dtrace on the 1.6 javaws indicates that /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/deployment.config is getting read. However, setting that does not help.

Misc Mac Java 3D.

  • http://support.apple.com/kb/DL1206 is a 2003! download for "Java 3D and Java Advanced Imaging Update: Information and Download". The installer says that it will only install in Mac OS X 10.3.1.
  • /usr/libexec/java_home shows which jvms are installed.
bash-3.2$ /usr/libexec/java_home -V
Matching Java Virtual Machines (8):
1.8.0_05, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home
1.7.0_55, x86_64: "Java SE 7" /Library/Java/JavaVirtualMachines/jdk1.7.0_55.jdk/Contents/Home
1.7.0_51, x86_64: "Java SE 7" /Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home
1.7.0, x86_64: "OpenJDK 7" /Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home
1.6.0_65-b14-462, x86_64: "Java SE 6" /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
1.6.0_65-b14-462, i386: "Java SE 6" /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
1.6.0_26-b03-383, x86_64: "Java SE 6" /Library/Java/JavaVirtualMachines/1.6.0_26-b03-383.jdk/Contents/Home
1.6.0_26-b03-383, i386: "Java SE 6" /Library/Java/JavaVirtualMachines/1.6.0_26-b03-383.jdk/Contents/Home

/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home

Caused by: java.lang.NoClassDefFoundError: javax/media/nativewindow/CapabilitiesImmutable

After a long hiatus, I tried starting Java3D under MacOS 10.12.6 (Sierra) with Java 1.8.0_144.

When running

  $PTII/bin/vergil -v ptolemy/domains/gr/demo/Pendulum/Pendulum.xml

I got:

Caused by: java.lang.NoClassDefFoundError: javax/media/nativewindow/CapabilitiesImmutable
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:264)
        at javax.media.j3d.Pipeline$PipelineCreator.run(Pipeline.java:74)
        at javax.media.j3d.Pipeline$PipelineCreator.run(Pipeline.java:61)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.media.j3d.Pipeline.createPipeline(Pipeline.java:91)
        at javax.media.j3d.MasterControl.loadLibraries(MasterControl.java:837)
        at javax.media.j3d.VirtualUniverse.<clinit>(VirtualUniverse.java:274)
        at javax.media.j3d.GroupRetained.<init>(GroupRetained.java:155)
        at javax.media.j3d.Group.createRetained(Group.java:88)
        at javax.media.j3d.SceneGraphObject.<init>(SceneGraphObject.java:114)
        at javax.media.j3d.Node.<init>(Node.java:172)
        at javax.media.j3d.Group.<init>(Group.java:551)
        at com.sun.j3d.utils.geometry.Primitive.<init>(Primitive.java:136)
        at com.sun.j3d.utils.geometry.Sphere.<init>(Sphere.java:190)
        at ptolemy.domains.gr.lib.Sphere3D._createModel(Sphere3D.java:164)
        at ptolemy.domains.gr.lib.GRShadedShape.initialize(GRShadedShape.java:336)
        at ptolemy.actor.Director.initialize(Director.java:939)
        at ptolemy.actor.Director.initialize(Director.java:908)
        at ptolemy.actor.sched.StaticSchedulingDirector.initialize(StaticSchedulingDirector.java:159)
        at ptolemy.domains.gr.kernel.GRDirector.initialize(GRDirector.java:289)
        at ptolemy.actor.CompositeActor.initialize(CompositeActor.java:932)
        at ptolemy.actor.Manager.initialize(Manager.java:724)
        at ptolemy.actor.Manager.execute(Manager.java:356)
        at ptolemy.actor.Manager.run(Manager.java:1261)
        at ptolemy.actor.Manager$PtolemyRunThread.run(Manager.java:1922)
Caused by: java.lang.ClassNotFoundException: javax.media.nativewindow.CapabilitiesImmutable
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 26 more

Probably the issue here was that I had Jogl 2.3 in my tree instead of Jogl 2.2. In particular, vendors/jogl/jogamp-all-platforms/jogl.README.txt said:

   Java (TM) Binding for the OpenGL (r) API, version 2.3

The Ptolemy instructions say to install Jogl 2.2.

The solution is to install Jogl 2.2:

       mkdir -p $PTII/vendors/jogl
       cd $PTI/vendors/jogl
       wget http://jogamp.org/deployment/v2.2.4/archive/jogamp-all-platforms.7z
       7z x jogamp-all-platforms.7z
       cd $PTII
       ./configure

Caused by: java.lang.NoClassDefFoundError: com/jogamp/opengl/GL

If you get

  Caused by: java.lang.NoClassDefFoundError: com/jogamp/opengl/GL

Then the problem is likely that j3dcore.jar and j3dutil.jar were compiled for Jogl 2.3. The solution is to revert to the previous version of these files

Rebuilding

Below are the steps to rebuild j3dcore.jar and j3dutil.jar for use with Jogl 2.3

If you don't have ../jogl/jogamp-allplatforms, see Install Java3D For Mac And Ptolemy above, except install Jogl 2.3 instead of 2.2.

  1. Create $PTII/vendors/j3d/PyramidExample.java from the above source
  2. Rebuild Java3d:
    cd $PTII/vendors/j3d
    git clone https://github.com/hharrison/vecmath.git
    (cd vecmath; ant)
    git clone https://github.com/hharrison/java3d-core.git
    git clone https://github.com/hharrison/java3d-utils.git
    ln -s java3d-utils j3d-utils
    mkdir jogl-v2.3.2
    (cd jogl-v2.3.2; ln -s ../../jogl/jogamp-all-platforms/jar/*)
    (cd java3d-core; ant)
  3. Compile
    export JAVA3D_EXT=$PTII/vendors/j3d/java3d-core/build/jars
    export JOGL_JAR=$PTII/vendors/jogl/jogamp-all-platforms/jar
    javac -classpath ${JAVA3D_EXT}/j3dcore.jar:${JAVA3D_EXT}/j3dutils.jar:j3d/vecmath/build/jars/vecmath.jar:${JOGL_JAR}/jogl-all.jar:${JOGL_JAR}/gluegen.jar:${JOGL_JAR}/joal.jar:. PyramidExample.java
  4. Create a link:
    mkdir natives;
    (cd natives; ln -s ../../jogl/jogamp-all-platforms/lib/macosx-universal/ .)
  5. Run:
    java -classpath ${JAVA3D_EXT}/j3dcore.jar:${JAVA3D_EXT}/j3dutils.jar:j3d/vecmath/build/jars/vecmath.jar:${JOGL_JAR}/jogl-all.jar:${JOGL_JAR}/gluegen.jar:${JOGL_JAR}/joal.jar:. PyramidExample
  6. Update the versions checked in to the tree:
    # Run the Ptolemy model:(:source lang=bash:)
    $PTII/bin/vergil $PTII/ptolemy/domains/gr/demo/Pendulum/Pendulum.xml
  7. Commit the changes:
     svn commit -m "Updated jars to avoid java.lang.NoClassDefFoundError: javax/media/nativewindow/CapabilitiesImmutable" $PTII/vendors/Darwin/j3d-1.6.0-pre11-daily-experimental/lib/ext/

NoClassDefFoundError: javax/media/opengl/GL

ptolemy.kernel.util.IllegalActionException:   in .SolarSystem.manager
Because:
javax/media/opengl/GL
        at ptolemy.actor.Manager.execute(Manager.java:505)
        at ptolemy.actor.Manager.run(Manager.java:1263)
        at ptolemy.actor.Manager$PtolemyRunThread.run(Manager.java:1915)
Caused by: java.lang.NoClassDefFoundError: javax/media/opengl/GL
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:264)
        at javax.media.j3d.Pipeline$PipelineCreator.run(Pipeline.java:74)
        at javax.media.j3d.Pipeline$PipelineCreator.run(Pipeline.java:61)

However, com/jogamp/opengl/GL.class is in the one of the jars listed in JAVA3D_JARS in $PTII/mk/ptII.mk:

bash-3.2$ echo '/Users/cxh/src/ptII11.0.devel/vendors/j3d/Darwin/j3d-1.6.0-pre11-daily-experimental/lib/ext/j3dcore.jar:/Users/cxh/src/ptII11.0.devel/vendors/j3d/Darwin/j3d-1\
.6.0-pre11-daily-experimental/lib/ext/j3dutils.jar:/Users/cxh/src/ptII11.0.devel/vendors/j3d/Darwin/j3d-1.6.0-pre11-daily-experimental/lib/ext/vecmath.jar:/Users/cxh/src/ptII\
11.0.devel/vendors/jogl/jogamp-all-platforms/jar/gluegen.jar:/Users/cxh/src/ptII11.0.devel/vendors/jogl/jogamp-all-platforms/jar/jogl-all.jar:/Users/cxh/src/ptII11.0.devel/ve\
ndors/jogl/jogamp-all-platforms/jar/gluegen-rt-natives-macosx-universal.jar'
| awk -F : '{for(i=1;i<=NF;i++) {print $i}}' | xargs -n 1 jar -tvf  | grep opengl | grep GL.class
 16977 Sat Oct 10 03:21:26 PDT 2015 com/jogamp/opengl/GL.class
 22157 Sat Oct 10 03:21:40 PDT 2015 com/jogamp/opengl/egl/EGL.class
  6055 Sat Oct 10 03:26:12 PDT 2015 jogamp/opengl/windows/wgl/WGL.class
  9722 Sat Oct 10 03:26:12 PDT 2015 jogamp/opengl/macosx/cgl/CGL.class
bash-3.2$

Solution: Under Mac OS X, probably Jogl 2.3 is installed, see above

Edit - History - Print - Recent Changes - Search
Page last modified on July 20, 2019, at 12:02 AM