Docear on macOS: Navigating the Apple Java Nightmare

So this blog post will be brief, as I suppress my disdain for Apple’s attitude towards Java, now that they no longer need it to survive due to their App Store ecosystem.

This blog post documents how I was able to get the Docear Mindmapping software working on OSX El Capitan (10.11).

Sadly, many Java applications which should ‘run anywhere’ simply don’t anymore on the Mac.  Apple abandoned their own internal version of the JRE and bundling with the OS, and deferred said support to the author of Java, now Oracle.  Oracle, too have contributed to the nightmare in providing little assistance in making the transition seamless.

After installing Docear on my mac, I attempted to start it with the icon in the Applications folder in the usual way only to find it bounce in the dock once, and disappear.  How rude I thought.  So I resorted to the command line (gotta love UNIX-like desktops).  When I attempted to start it there, I was presented with the ugly error message:

$ /Applications/
JavaVM: Failed to load JVM: /Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home/bundle/Libraries/libserver.dylib
JavaVM: Failed to load JVM: /Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home/bundle/Libraries/libserver.dylib
JavaVM FATAL: Failed to load the jvm library.
[JavaAppLauncher Error] JNI_CreateJavaVM() failed, error: -1

Just lovely.  I actually thought I was running Java JRE 1.8 that I downloaded from Oracle.  Seems there are other versions lurking on my system.

I’ll spare you all the drudgery of diagnosing this issue and coming up with a solution.  I will tip my hat to Oliver Dowling and his blog post which eventually lead me to the solution below.  One thing I did learn is that creating a symbolic link for libserver.dylib did not work for me.  I had to instead create a hard link.  I suspect the JRE stub FreeplanJavaApplicationStubJavaVM binary was checking for the existence of a ‘normal’ file rather than ‘a’ file.

Anyway, here are the goods to make Docear work on OSX10.11 (and hopefully other versions).  Be sure to substitute the Java version numbers in the file paths with your version of Java installed.

$ cd /Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home
$ sudo ln -s jre/lib bundle
$ cd bundle
$ sudo mkdir Libraries
$ sudo ln /Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home/jre/lib/server/libjvm.dylib libserver.dylib

Hopefully after executing these commands, you will be able to use Docear.  Good luck!

Copyrights of publicly funded research

I am responding to a blog post by Stu where he highlights the benefits of the Budapest Open Access Initiative.

Artefacts created by publicly funded institutions should be licensed in the public domain, using licences such as the creative commons. I agree with you Stu. This ensures that it remains in the public domain, including all derivatives for future generations to enjoy. As a semi-active researcher, it bothers me that I no longer hold the copyright to papers that I have written and published in journals. In fact, one publisher had the gall to reprint a paper I wrote as a book chapter, and then asked me to buy the book, and encourage my institution’s library to do the same.

As a researcher it also frustrates me when I come up against paywalls for articles. It is frightening to me just how much of the global body of knowledge is owned by such a small number of very large corporate conglomerates. I am encouraged by the actions of Princeton University and many others who are creating policy:

aimed at broadening the reach of their scholarly work and encouraging publishers to adjust standard contracts that commonly require exclusive copyright as a condition of publication.

Academic publishers have been on a good wicket for a long time.  It’s time for a change.