LSOpenURLsWithRole() failed with error -10810

Solution 1:

The error occurs because JVM failed to launch - the Java application itself has been hardcoded to load libserver.dylib. This file exist for Java 1.6 and older, but not for Java 1.7 and above.

Workaround

Create the directory structure and symlink from libjvm.dylib to libserver.dylib

$ sudo mkdir -p /Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/bundle/Libraries/
$ sudo ln -s /Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/jre/lib/server/libjvm.dylib /Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/bundle/Libraries/libserver.dylib

Note that this is specific to JDK 1.8.0 update 5. The paths will need to be updated in three places for future versions.

Solution

Modify the Java application's code so that it will not look for libserver.dylib. You should really not hard-code the path to JVM. Instead, use /usr/libexec/java_home if you need the path of JVM in OSX.