On my Mac, I cannot open JNLP files. Double-clicking them opens a pop-up with the message:
The operation couldn’t be completed. Unable to locate a Java Runtime that supports javaws. Please visit http://www.java.com for information on installing Java.
And from a terminal:
$ export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_333.jdk/Contents/Home/
$ /usr/bin/java -version
java version "1.8.0_333"
Java(TM) SE Runtime Environment (build 1.8.0_333-b02)
Java HotSpot(TM) 64-Bit Server VM (build 25.333-b02, mixed mode)
$ /usr/bin/javaws
The operation couldn’t be completed. Unable to locate a Java Runtime that supports javaws.
Please visit http://www.java.com for information on installing Java.
I know Java Web Start was deprecated in Java 9 and removed in Java 11. But this is an Oracle JDK 8. I believe it should provide Java Web Start. So what is going on?
If anyone is facing the same issue, this was a permission issue, although the error message is misleading.
In System Settings > Java > Security, make sure “Enable launching Java Web Start applications from the browser” is enabled, even when launching them without a browser.
“System Settings” is the native macOS configuration app.