Java3D Issue: BoneJ with latest Fiji version - Problem solved

@mdoube I think this would be a great idea, and a definite improvement. With a Jenkins job building the binaries, we’d have “managed” versions of BoneJ1’s dependencies, and like @ctrueden said, a simple “Download & go”-link that wouldn’t require any external jars.

Sorry I missed this paragraph earlier—I guess you edited it in later. I also have a bad habit of doing that. The forum is too convenient! :wink:

Anyway, I completely understand your concern about not getting too bogged down in legacy support. I have exactly the same problem with ImageJ 1.x. Every day I spend hacking on imagej-legacy is a day that ImageJ2 and friends are ultimately not getting better. It’s a tough balance.

So never mind my suggestion, and sorry for the noise.

@rimadoma - if you can do it quickly with a Jenkins script that uses the BoneJ_.jar that is posted at (so I don’t have to change my build & deployment protocol), then please do.

Please also make clear to users on the download site that this is just Fiji bundled with Java 6 and BoneJ. A ‘quickstart’ bundle, if you will.

@ctrueden it’s important for me to be able to count downloaders (to prove to funders they are getting something for their money). Can I get download stats from the wiki?

1 Like

@rimadoma When dropping BoneJ_.jar into a (Java 6) Fiji installation this way, are there any other changes that need to be made? JAR dependencies that need to be added or removed? Or does it work “out of the box”? If it works as is, it would make most sense to just create the BoneJ update site and upload BoneJ_.jar there. Then we could:

  1. Have a Jenkins job that automatically checks BoneJ_.jar timestamp from, uploading a new version whenever it has changed. I wrote a general-purpose script for this:; see for a usage example.
  2. Have another Jenkins job that creates the BoneJ distribution bundle by enabling the ImageJ, Fiji and BoneJ update sites, then SCPs the files to This would be similar to the Stable-Fiji-Java-8 job.

We run AWStats on all our sites; happy to share the link with you offline. We could also share raw weblogs if you need them for your own analytics.

NO. I really want to avoid this - the implication is that we’re all hooked in to the dependency management scheme, which we will not be for BoneJ1.

Please - no update site before BoneJ2

Not in my experience. Works out of the box (as long as Java3D has been installed for/by ImageJ 3D Viewer).

Can’t this be done by just wget-ing Bonej_.jar into the Fiji plugins directory and zipping the lot up with a suitable JRE?

So then Jenkins would run a shell script that:

  1. Check if BoneJ_.jar has changed; exit if not
  2. Download the new BoneJ_.jar
  3. Download ZIP and TAR.GZ archives from
  4. For each archive:
    • Add plugins/BoneJ_.jar to the archive
    • s/fiji/bonej/ on the archive filename
  5. Wrap bonej-macosx.tar.gz into bonej-macosx.dmg in the same way that Stable-Fiji-MacOSX does it
  6. SCP all archives to or similar

Essentially. See steps above.

This can be quite low frequency: BoneJ1 does not get updated very often

Hi Curtis,

Returning to the topic of Jenkins builds of legacy BoneJ1 for different platforms. What would this BoneJ_.jar used as a basis actually be? Would it be the BoneJ1 JAR as it is now, i.e. the one-in-all that includes plugin code that could be off-loaded such as AnalyzeSkeleton? The JAR also has references to old Java3d / Image3d Viewer code that has serious compatibility issues with Java 8.

Or, would the BoneJ_.jar here be the result of building the mavenized version the legacy code @hinerm and I started at Madison? I’m almost done working out the kinks there. In this version we’ve offloaded code like Skeletonize to Maven dependencies. Also Java3d code comes now from org.scijava and Image3D Viewer is a dependency.

This mavenization is going to be my starting point for migrating the code to BoneJ2, but we could take a freeze frame of this code now, and use it to build future bug fixes to legacy BoneJ1. Also some Maven settings like enforcing Java 6 compatibility could be different for it.

At the moment I’m quite confused as to how the BoneJ1 builds are going to actually work in your scenario, but I support the general idea, and see many benefits to it. Could we go over this in more detail, so that we’re on the same page, and that I can explain the plan to Michael?

Best Regards,

@rimadoma Sorry I dropped the ball in replying to this. If you still want to pursue it, it would probably be easiest to set up a video chat where we go over the details. Ping me on Gitter or via email if you want to do that?

No worries, I’m not pursuing this goal any more. It’d make things more complicated than they have to be.

Good time of a day, friends.

It seems I have the same problem on widows. At least I cannot run 3d manager (though other parts of 3d suit work). I guess it’s a part of the same problem, that why I decided to post in here. Though I might start new topic if needed. Any ideas how I can fix it? Java is fully updated.

(Fiji Is Just) ImageJ 2.0.0-rc-43/1.51h; Java 1.6.0_24 [64-bit]; Windows 7 6.1; 33MB of 12235MB (<1%)
java.lang.NoClassDefFoundError: org/scijava/vecmath/Color3f
	at java.lang.Class.getDeclaredMethods0(Native Method)
	at java.lang.Class.privateGetDeclaredMethods(
	at java.lang.Class.getDeclaredMethod(
	at java.awt.Component.isCoalesceEventsOverriden(
	at java.awt.Component.access$500(
	at java.awt.Component$
	at java.awt.Component$
	at Method)
	at java.awt.Component.checkCoalescing(
	at java.awt.Component.<init>(
	at java.awt.Container.<init>(
	at java.awt.Window.<init>(
	at java.awt.Frame.<init>(
	at java.awt.Frame.<init>(
	at javax.swing.JFrame.<init>(
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
	at java.lang.reflect.Constructor.newInstance(
	at java.lang.Class.newInstance0(
	at java.lang.Class.newInstance(
	at ij.IJ.runUserPlugIn(
	at ij.IJ.runPlugIn(
	at ij.Executer.runCommand(
Caused by: java.lang.ClassNotFoundException: org.scijava.vecmath.Color3f
	at Method)
	at java.lang.ClassLoader.loadClass(
	at sun.misc.Launcher$AppClassLoader.loadClass(
	at java.lang.ClassLoader.loadClass(
	... 27 more

@Vasily The code you invoked has been updated to use the SciJava version of Java 3D 1.6. So you need to update your Fiji to the latest version. You are still running the old Java 6 version.

Unfortunately, the ImageJ Updater cannot currently do this update for you. The easiest way forward is to download a new copy of Fiji from the web site. See also this page for details on the transition.

If you have a heavily customized Fiji installation and would rather not reinstall, you can: 1) update to Java-8 by renaming the\java folder to\java6; 2) Launch Fiji and make sure the status bar says “Java 1.8.0…” and not “Java 1.6.0_24”; and then 3) Enable the Java-8 update site and install all the updates.

If you want to play it safe, unpack a newly downloaded Fiji into a new directory, and leave your old installation alone. It is certainly OK to have multiple copies of Fiji on your system.

A post was split to a new topic: Image disappearing rapidly

Hello, I tried to install the latest fiji and bonej and I have issues. I am using mac sierra (10.12.6). Fiji works fine. I installed bonej, but when I use any of the functions it says “java 3d libraries are not installed. please install and run the imagej 3d viewer, which will automatically install java’s 3d libraries.”

I checked and it appears that the 3d viewers are working correctly in fiji.

Any suggestions?

Thank you.

@rhk12 It is recommended that you use the Java 6 version of Fiji with BoneJ. It is not fully compatible with the current Java 8 version.

  • Go here:
  • Download the “2017 May 30” version of Fiji, i.e. the final version of Fiji using Java 6.
  • Unpack it somewhere beneath your home folder.
  • Download and install BoneJ into that installation.
  • Launch Fiji and run Plugins :arrow_forward: 3D Viewer to trigger installation of the 3D Viewer.
  • Restart Fiji.

After that, all BoneJ functionality should work; please follow up here if not.

Edit: I added these instructions to the BoneJ wiki page.

Edit 2:

Note that I am not 100% certain that Java 6 + Java 3D 1.5 actually works on macOS Sierra. At least, it doesn’t work on my system (Java dumps core on startup), although my system may have unique quirks. But it is also possible that Apple changed something in Sierra that renders this combination infeasible now.

It would be helpful if someone else on macOS Sierra could test this and report back.

1 Like

Hello there!

We are beating our heads against the wall with the same error(s). I have tried several different install combinations and we are not able to get Fiji, BoneJ, and Java 3d working at the some time.

We are using MacOS Sierra 10.12.6

When launching one of the BoneJ functions we get the message about “java 3d libraries are not installed…” or if I test the 3d Viewer I get the following dump in the console:

version = 1.5
Exception in thread “J3D-Renderer-1” java.lang.UnsatisfiedLinkError: /Applications/ Library not loaded: /System/Library/Frameworks/JavaVM.framework/Libraries/libjawt.dylib Referenced from: /Applications/ Reason: image not found
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(
at java.lang.ClassLoader.loadLibrary(
at java.lang.Runtime.loadLibrary0(
at java.lang.System.loadLibrary(
at com.sun.opengl.impl.NativeLibLoader.loadLibraryInternal(
at com.sun.opengl.impl.NativeLibLoader.access$000(
at com.sun.opengl.impl.NativeLibLoader$DefaultAction.loadLibrary(
at com.sun.opengl.impl.NativeLibLoader.loadLibrary(
at com.sun.opengl.impl.NativeLibLoader.access$200(
at com.sun.opengl.impl.NativeLibLoader$
at Method)
at com.sun.opengl.impl.NativeLibLoader.loadAWTImpl(
at com.sun.opengl.impl.JAWT.getJAWT(
at com.sun.opengl.impl.macosx.MacOSXOnscreenGLDrawable.lockSurface(
at com.sun.opengl.impl.macosx.MacOSXOnscreenGLContext.makeCurrentImpl(
at com.sun.opengl.impl.GLContextImpl.makeCurrent(

I have been trying to get this to work for weeks now. Please advise before I start drinking again. :weary:


Sorry to hear of your troubles, @D_Maag.

Your error message of “image not found” for file /System/Library/Frameworks/JavaVM.framework/Libraries/libjawt.dylib suggests that Java 6 may not be installed. Are you confident your Fiji is running with Java 6? Here’s how to check. Note that running Java 6 on macOS is increasingly painful, but it can still be done; see here for instructions.

That said, I checked on my High Sierra system, and indeed the file /System/Library/Frameworks/JavaVM.framework/Libraries/libjawt.dylib is not present anymore, even though I have Java 6 installed. Instead, I found that file here: /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Libraries. I will do some testing now, see if I can reproduce, and fix the issue locally. Edit: I have the same issue. And it cannot be fixed easily with a symlink because macOS disallows edits to /System due to the System Integrity Protection feature of El Capitan and later. I tried to develop a shell script to work around the problem, but the library linkages are really broken now.

If your choices are really to either make this work, or start drinking again, then next thing to try would be to disable System Integrity Protection and start symlinking Library directories and/or dylib and jnilib files, hoping to make something work. But I would urge you to consider sticking with an older version of macOS instead, since this seems like a crumbling path.

Perhaps @rimadoma or @mdoube could comment on the timeline for BoneJ to work with Java 8 + Java 3D 1.6 and/or SciView.

Hi @D_Maag,

Sorry to hear about your troubles. Depending on which BoneJ tools you need, you could try the experimental version of BoneJ2. Implemented so far are:

  • Analyze skeleton
  • Connectivity
  • Fractal dimension
  • Intertrabecular angles
  • Isosurface
  • Local thickness
  • Skeletonize
  • Support for additional file formats
  • Volume fraction

Here are instructions how to install it on either Fiji or ImageJ:

Best regards,