NullPointerException due to missing mrj.version on Mac OS X Sierra (10.12.5)
Brought to you by:
jchapman0
I recently came across BrowserLauncher2 while looking for a platform independant mechanism for opening a default browser with more reliability than the java.awt.Desktop API provides.
Unfortunately it doesn't work on Mac OS X Sierra (10.12.5). The BrowserLaunching factory assumes the existence of the mrj.version system property which is not defined. Running java -XshowSettings:properties confirms the property isn't there. The subsequent attempt to call substring on the result of the System.getProperty call throws a NullPointerException, killing the application at that point.