NOTICE! This is a static HTML version of a legacy Fiji BugZilla bug.

The Fiji project now uses GitHub Issues for issue tracking.

Please file all new issues there.

Bug 1095 - 3D viewer not working with Java 8 & bundled Java3D
3D viewer not working with Java 8 & bundled Java3D
Status: RESOLVED FIXED
Product: Fiji
Classification: Unclassified
Component: 3D Viewer
unspecified
Macintosh Mac OS
: P5 normal
Assigned To: Curtis Rueden
: 1096 1113 1121 1136 1178
Depends on:
Blocks:
 
Reported: 2015-06-19 07:21 CDT by Radoslaw Ejsmont
Modified: 2015-11-23 22:10 CST
7 users (show)

See Also:

Description Radoslaw Ejsmont 2015-06-19 07:21:44 CDT
The 3D viewer is not working with Java 8 & bundled Java3D

./Fiji.app/Contents/MacOS/ImageJ-macosx
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release 

[...]

Starting 3D viewer throws:

version = 1.5
Exception in thread "J3D-Renderer-1" java.lang.UnsatisfiedLinkError: no jogl in java.library.path
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1865)
	at java.lang.Runtime.loadLibrary0(Runtime.java:870)
	at java.lang.System.loadLibrary(System.java:1122)
	at com.sun.opengl.impl.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:189)
	at com.sun.opengl.impl.NativeLibLoader.access$000(NativeLibLoader.java:49)
	at com.sun.opengl.impl.NativeLibLoader$DefaultAction.loadLibrary(NativeLibLoader.java:80)
	at com.sun.opengl.impl.NativeLibLoader.loadLibrary(NativeLibLoader.java:103)
	at com.sun.opengl.impl.NativeLibLoader.access$200(NativeLibLoader.java:49)
	at com.sun.opengl.impl.NativeLibLoader$1.run(NativeLibLoader.java:111)
	at java.security.AccessController.doPrivileged(Native Method)
	at com.sun.opengl.impl.NativeLibLoader.loadCore(NativeLibLoader.java:109)
	at com.sun.opengl.impl.macosx.MacOSXGLDrawableFactory.<clinit>(MacOSXGLDrawableFactory.java:53)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:264)
	at javax.media.opengl.GLDrawableFactory.getFactory(GLDrawableFactory.java:108)
	at javax.media.j3d.JoglPipeline$QueryCanvas.<init>(JoglPipeline.java:9010)
	at javax.media.j3d.JoglPipeline.getBestConfiguration(JoglPipeline.java:8774)
	at javax.media.j3d.Renderer.doWork(Renderer.java:495)
	at javax.media.j3d.J3dThread.run(J3dThread.java:256)

Putting Java3D libs from Fiji.app/java/ into /Library/Java/Extensions partially resolves the issue, but now the required OS X framework is missing:

Exception in thread "J3D-Renderer-1" java.lang.UnsatisfiedLinkError: /Library/Java/Extensions/libjogl_awt.jnilib: dlopen(/Library/Java/Extensions/libjogl_awt.jnilib, 1): Library not loaded: /System/Library/Frameworks/JavaVM.framework/Libraries/libjawt.dylib
  Referenced from: /Library/Java/Extensions/libjogl_awt.jnilib
  Reason: image not found
	at java.lang.ClassLoader$NativeLibrary.load(Native Method)
	at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1937)
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1859)
	at java.lang.Runtime.loadLibrary0(Runtime.java:870)
	at java.lang.System.loadLibrary(System.java:1122)
	at com.sun.opengl.impl.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:189)
	at com.sun.opengl.impl.NativeLibLoader.access$000(NativeLibLoader.java:49)
	at com.sun.opengl.impl.NativeLibLoader$DefaultAction.loadLibrary(NativeLibLoader.java:80)
	at com.sun.opengl.impl.NativeLibLoader.loadLibrary(NativeLibLoader.java:103)
	at com.sun.opengl.impl.NativeLibLoader.access$200(NativeLibLoader.java:49)
	at com.sun.opengl.impl.NativeLibLoader$2.run(NativeLibLoader.java:132)
	at java.security.AccessController.doPrivileged(Native Method)
	at com.sun.opengl.impl.NativeLibLoader.loadAWTImpl(NativeLibLoader.java:118)
	at com.sun.opengl.impl.JAWT.getJAWT(JAWT.java:91)
	at com.sun.opengl.impl.macosx.MacOSXOnscreenGLDrawable.lockSurface(MacOSXOnscreenGLDrawable.java:144)
	at com.sun.opengl.impl.macosx.MacOSXOnscreenGLContext.makeCurrentImpl(MacOSXOnscreenGLContext.java:57)
	at com.sun.opengl.impl.GLContextImpl.makeCurrent(GLContextImpl.java:134)
	at javax.media.j3d.JoglPipeline$QueryCanvas.doQuery(JoglPipeline.java:9030)
	at javax.media.j3d.JoglPipeline.getBestConfiguration(JoglPipeline.java:8778)
	at javax.media.j3d.Renderer.doWork(Renderer.java:495)
	at javax.media.j3d.J3dThread.run(J3dThread.java:256)

Current complete workaround is to remove bundled Java3D 1.5 from Fiji app and install Java3D 1.6 from jogamp.
Comment 1 Curtis Rueden 2015-06-19 09:57:56 CDT
This issue will be addressed with the switch to the JOGL-based Java 3D 1.6.

See:
https://github.com/imagej/imagej/issues/120
Comment 2 Curtis Rueden 2015-06-19 12:19:00 CDT
*** Bug 1096 has been marked as a duplicate of this bug. ***
Comment 3 Mark Hiner 2015-07-15 09:11:26 CDT
*** Bug 1113 has been marked as a duplicate of this bug. ***
Comment 4 Curtis Rueden 2015-07-22 13:02:38 CDT
*** Bug 1121 has been marked as a duplicate of this bug. ***
Comment 5 Jan Eglinger 2015-08-05 09:54:41 CDT
*** Bug 1136 has been marked as a duplicate of this bug. ***
Comment 6 Curtis Rueden 2015-10-21 11:30:54 CDT
*** Bug 1178 has been marked as a duplicate of this bug. ***
Comment 7 Curtis Rueden 2015-11-23 22:10:56 CST
There is now a "3D" update site which provides a version of 3D Viewer et. al that works using the new Java 3D 1.6, and hence with Java 8.

This update site requires at least Java 7 to work -- it will not work with Java 6.

Please give it a try and let us know how it works for you!