Search code examples
javamacosjava-web-startjnlp

Java 8 is installed on Macbook Air - Apple M1. How to open JNLP files?


Now I have installed Java 8. Please see the paths and do tell me what am I missing. JNLP files can't be launched with javaws comand.

Macbook Air M1

% echo $PATH
/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
:/Users/xx/installations/icedtea/bin:/opt/homebrew/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin

Java version:

% which java  
/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/java

% java -version
openjdk version "1.8.0_292"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_292-b10)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.292-b10, mixed mode)

% 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.

% which javaws
/usr/bin/javaws

% cd /Library/Java/JavaVirtualMachines/                   
JavaVirtualMachines % ls
adoptopenjdk-8.jdk

Downloads % javaws xyz.jnlp 
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.

Included symbolic link:

% sudo ln -sfn /opt/homebrew/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk

I've read Unable to locate a Java Runtime that supports javaws although Java 8 is installed, but the answer talks of a setting in the MacBook which is not there in M1 series.


Solution

  • Well, the solution that worked was to install OpenWebStart_macos-aarch64_1_11_0.dmg from: https://openwebstart.com/download/

    Once it is installed you will see settings feature in its folder. If Mac complains about Proxy, we can set "No Proxy" from the settings of this software.

    In System Settings->Privacy and Security-> (scroll down) give it permission to run.