Some years ago now, a co-worker mentioned Sweet Home 3D, at which point I proceeded to download and map out every inch of my house. It has actually proven itself invaluable for a number of what-if scenarios, including the purchase of a larger desk in our home office as well as other projects which involved rearranging items from one room to the next.

Unfortunately, with each new MacOS upgrade this product seems to experience new levels of dysfunction. These are generally related to the version of Java being referenced at runtime. This is further exasperated by installing updated versions of the application itself.

After upgrading to macOS Sierra along with Sweet Home 3D 5.4, I am greeted with a splash screen and nothing more. At the command prompt, the following occurs:

$ cd '/Applications/Sweet Home 3D.app/Contents/MacOS'
$ ./SweetHome3D 
[JavaAppLauncher] Requested [1.5*], launching in [1.8] instead.
Java 3D: implicit antialiasing enabled
Exception in thread "J3D-Renderer-1" java.lang.UnsatisfiedLinkError: no jogl in java.library.path
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
	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.(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.(JoglPipeline.java:9029)
	at javax.media.j3d.JoglPipeline.getBestConfiguration(JoglPipeline.java:8793)
	at javax.media.j3d.Renderer.doWork(Renderer.java:514)
	at javax.media.j3d.J3dThread.run(J3dThread.java:275)

While the native method failure looks daunting, the real problem started when JDK 1.8 was launched as this doesn’t have Java OpenGL (JOGL) in my library path with native methods compiled for macOS Sierra.

There are a few approaches, but the easier tactic is to install Mac OS Java 1.6 and reconfigure the Sweet Home launcher to use it. This version of Java includes JOGL 1.1 and will work just fine with Sweet Home and most other applications that need this.

After installing the legacy Java 1.6, modify the Sweet Home launcher by editing /Applications/Sweet Home 3D.app/Contents/Info.plist and changing JVMVersion from 1.5* to an explicit value of 1.6. When you’re done it should look like this:

<!-- JavaApplicationStub arguments for Java 5 & 6 -->
 <key>Java</key>
 <dict>
 <key>JVMVersion</key>
 <string>1.6</string>
 <key>MainClass</key>
 <string>com.eteks.sweethome3d.SweetHome3D</string>
...

Now that Java 1.6 is required, at launch the application reports this is the JRE being used and everything launches successfully.

Some time was spent researching how to install JOGL, which appeared to be available from http://jogamp.org/. However, after putting the native libraries into place this didn’t seem to launch on Sierra and instead produced an error about yet another missing library – perhaps they will work with another version of OS/X.

According to Oracle the JOGL project is inactive which means it will not be part of the JDK going forward. This is unfortunate as the JDK would have been the most ideal method of distribution since it includes native binaries for each platform.