16

I'm trying to run an application downloaded from the internet (e.g., Jabref) but it seems that it fails silently. When I try to open it by double clicking it, nothing happens. When I use the terminal I get the following message:

LSOpenURLsWithRole() failed with error -10810 for the file .../xxxx.app

I tried several suggestions that I found here like changing permissions and modifying the Info.plist file, but nothing works.

Because it's a Java application, I tried to run it through terminal using

java -cp "CLASSPATH" MAINCLASS

and it works fine.

Just to mention that I get this error not only with this app, but for a few other applications.

Thanks in advance.

3 Answers 3

9

The LSOpenURLsWithRole is a function that is used to associate a file with a program. The file you're double clicking on is not actually an application, but a data file.

This is how, for example, when double-clicking a text document, the TextEdit program or another associated app is launched.

You need to associate it with the java runtime, assuming that you have it installed.

If you right-click on the file and select Get Info, the info pane has a section called "Open With:". That should be set to the java runtime.

5

For anyone coming here who is seeing this issue for a non-Java program: I was getting the same error message when trying to run a .app file which contains a Mach-O executable. Trying to run the executable directly from within the bundle (e.g. Foo.app/Contents/MacOS/bar) gave me a much better error indicating I was missing a dynamic lib dependency:

dyld: Library not loaded:/usr/local/opt/qt5/lib/QtWidgets.framework/Versions/5/QtWidgets

Something to try if you are seeing this error.

2

I was also encountering this error with a Java program I was trying to deploy. I could not get it to work on my second Mac: 10.11.6. I looked everywhere for the answer, but never found one, so I'm putting this here for others to benefit. By launching the System Console, I discovered the error message that the "open" program could not find the program "JavaApplicationStub" in the bundle Contents. The problem is, my bundle was using "JavaAppLauncher" to launch. I had just changed from using the old Apple JarBundler to the Oracle AppBundler so I could sign the app, and the launch program name is different. The key here is that the new bundle (version 7.1.1) was replacing the old one (version 7.1.0), and had the same application name. The old one used JavaApplicationStub to launch.

It appears the Info.plist properties for the program were cached, and it was using stale values to launch the new bundle. Don't know if the cache is cleared on logout or reboot, or if this is fixed in newer versions of OS X, but I have to have this work smoothly for all end users.

I got around the problem by including the version number in the program name.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .