I'm on Ubuntu MATE 18.04. All the jnlp applications I tried give execution error. After inspection, some libraries seem to be missing in Java.
So I removed everything, started installation again, and found that apt-get install icedtea-8-plugin depends on:
ca-certificates-java default-jre default-jre-headless icedtea-8-plugin icedtea-netx librhino-java libtagsoup-java openjdk-11-jre openjdk-11-jre-headlessWhile it is expected to depend on openjdk-8, not 11 (according to ubuntu packages website). I suspect that jdk-11 does not include some libraries required for this.
My guess is that I installed some PPA that now produces this situation where jdk-11 is a more up to date choice than any jdk-8 package. So, how can I achieve that icedtea-8 is installed with openjdk-8, and not 11?
EDIT: This is the output when I try to launch from firefox a jnlp application:
Denying permission: ("java.lang.RuntimePermission" "accessClassInPackage.sun.util.resources")
net.sourceforge.jnlp.LaunchException: Fatal: Launch Error: Could not launch JNLP file. The application has not been initialized, for more information execute javaws/browser from the command line and send a bug report. at net.sourceforge.jnlp.Launcher.launchApplication(Launcher.java:582)
...
Running jdk9+ ?
java.lang.ClassNotFoundException: sun/misc/JarIndex
...
java.io.FileNotFoundException: /home/roman/.config/icedtea-web/deployment.properties (No existe el archivo o el directorio) at (Native Method)The ClassNotFoundException: sun/misc/JarIndex is what made me thought that is due to the dependency on jdk11, since this class seems to have been removed in Java 9.
I tried installing only openjdk-8, and then build icedtea from source. Nevertheless, when I finished, it was not detected by firefox (maybe some command was missing).
Any idea?
Also, find below the output of those commands (after trying installing according to your answer):
roman@roman-desktop:~$ update-java-alternatives -l
java-1.11.0-openjdk-amd64 1111 /usr/lib/jvm/java-1.11.0-openjdk-amd64
java-1.8.0-openjdk-amd64 1081 /usr/lib/jvm/java-1.8.0-openjdk-amd64
roman@roman-desktop:~$ which javaws
/usr/bin/javaws 6 9 Answers
After some trial and error I found only one useful solution - we need to install normal OpenJDK 8 from previous Ubuntu 16.04 LTS manually with commands below. It is usually not recommended, but we do not have other methods with positive result.
So the commands to install are the following (we remove existing OpenJDK and then install deb-packages manually):
sudo apt purge oracle-java11-* -y
sudo apt purge *openjdk* -y
sudo apt autoremove --purge -y
wget
sudo apt install -y ./openjdk-8-jre-headless_8u222-b10-1ubuntu1~16.04.1_amd64.deb
wget
sudo apt install -y ./libpng12-0_1.2.54-1ubuntu1.1_amd64.deb
wget
sudo apt install -y ./openjdk-8-jre_8u222-b10-1ubuntu1~16.04.1_amd64.deb
wget
sudo apt install -y ./icedtea-netx-common_1.6.2-3ubuntu1_all.deb
wget
sudo apt install -y ./icedtea-netx_1.6.2-3ubuntu1_amd64.debAlso we need to pin/hold the versions of such packages with single long command below:
cat <<EOF | sudo tee /etc/apt/preferences.d/pin-java8
Package: icedtea-netx
Pin: version 1.6.2-3ubuntu1
Pin-Priority: 1337
Package: icedtea-netx-common
Pin: version 1.6.2-3ubuntu1
Pin-Priority: 1337
Package: openjdk-8-jre
Pin: version 8u272-b10-0ubuntu1~16.04
Pin-Priority: 1337
Package: openjdk-8-jre-headless
Pin: version 8u272-b10-0ubuntu1~16.04
Pin-Priority: 1337
EOFand then the application will run with
javaws StartProRealTime.jnlpNotes: the installation of Oracle Java 11 or 12 does not help either.
8On my system I found that javaws was still trying to use jre-11 (which didn't work), because the default-jre-headless (a dependency of icedtea-netx) created a link (that was not being modified by update-java-alternatives).
$ javaws
selected jre: /usr/lib/jvm/default-javaI had to manually change that symbolic to point to the jre-8 version in order to have javaws running again.
I was able to set default java-8 or java-11.
$ sudo update-java-alternatives --jre --set java-1.8.0-openjdk-amd64
$ sudo update-java-alternatives --jre-headless --set java-1.8.0-openjdk-amd64
$ sudo update-java-alternatives --set java-1.8.0-openjdk-amd64
update-alternatives: error: no alternatives for appletviewer
update-alternatives: error: no alternatives for mozilla-javaplugin.so
update-java-alternatives: jdk alternative does not exist: /usr/lib/jvm/java-8-openjdk-amd64/bin/appletviewer
update-java-alternatives: jdk alternative does not exist: /usr/lib/jvm/java-8-openjdk-amd64/bin/jconsole
update-java-alternatives: plugin alternative does not exist: /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/IcedTeaPlugin.so$ sudo update-java-alternatives --jre --set java-1.11.0-openjdk-amd64
$ sudo update-java-alternatives --jre-headless --set java-1.11.0-openjdk-amd64
$ sudo update-java-alternatives --set java-1.11.0-openjdk-amd64
update-alternatives: error: no alternatives for appletviewer
update-alternatives: error: no alternatives for mozilla-javaplugin.soand then properly set variable JAVA_HOME by one of commands
$ export JAVA_HOME=$(readlink -f /usr/bin/java | sed "s:bin/java::")
$ export JAVA_HOME=$(readlink -f /usr/bin/java | sed "s:jre/bin/java::")
$ echo $JAVA_HOMEIt is worth to check the variable value.
When running
$ javaws filename.jnplI have got some warning and response including
netx: Invalid jnlp file /home/phobos/express.jnpl
The express.jnpl is the ARIS express modelling tool from
The respective responses are
$ javaws ~/express.jnpl
selected jre: /usr/lib/jvm/java-8-openjdk-amd64/jre/
(java:11196): dbind-WARNING **: 19:40:56.468: Couldn't register with accessibility bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
netx: Invalid jnlp file /home/phobos/express.jnpl$ javaws ~/express.jnpl
selected jre: /usr/lib/jvm/java-11-openjdk-amd64/
WARNING: package javax.jnlp not in java.desktop
netx: Invalid jnlp file /home/phobos/express.jnplNow it remains to find out whats wrong eithwer with jnpl file, or with my configuration.
SOLVED - I used wrong file name. It is working now.
$ javaws ~/express.jnlp
selected jre: /usr/lib/jvm/java-8-openjdk-amd64/jre/
selected jre: /usr/lib/jvm/java-8-openjdk-amd64/jre/
Codebase matches codebase manifest attribute, and application is signed. Continuing. See: for details.
Starting application [com.idsscheer.aris.expresslauncher.AExpressLauncher] ...
May 02, 2019 6:36:28 PM com.idsscheer.aris.common.ADebug println
INFO: [config] creating plugin.cfg from jar fileRunning ok with current version 8u212. It remains to make JAVA_HOME name change permanent.
It has obviously to do with reference to Oracle. I uninstalled Oracle java long time ago. (I did not find the solution, yet.) I am on Ubuntu 19.04 using Unity.
See following, specifically "selected jre"
$ update-java-alternatives -l
java-1.11.0-openjdk-amd64 1111 /usr/lib/jvm/java-1.11.0-openjdk-amd64
java-1.8.0-openjdk-amd64 1081 /usr/lib/jvm/java-1.8.0-openjdk-amd64$ java -version
openjdk version "11.0.3" 2019-04-16
OpenJDK Runtime Environment (build 11.0.3+7-Ubuntu-1ubuntu1)
OpenJDK 64-Bit Server VM (build 11.0.3+7-Ubuntu-1ubuntu1, mixed mode, sharing)$ which javaws
/usr/bin/javaws$ javaws
selected jre: /usr/lib/jvm/java-8-oracle
thread 'main' panicked at 'Error spawning JVM process, java executable: [/usr/lib/jvm/java-8-oracle], arguments: [["-splash:/usr/share/icedtea-web/javaws_splash.png", "-Xbootclasspath/a:/usr/share/icedtea-web/javaws.jar:/usr/share/java/js.jar:/usr/share/java/tagsoup.jar:/usr/lib/jvm/java-8-oracle/lib/ext/nashorn.jar:", "-classpath", "/usr/lib/jvm/java-8-oracle/lib/rt.jar:/usr/lib/jvm/java-8-oracle/lib/ext/jfxrt.jar:", "-Dicedtea-web.bin.name=javaws", "-Dicedtea-web.bin.location=/usr/lib/icedtea-web/bin/javaws", "net.sourceforge.jnlp.runtime.Boot"]]', src/os_access.rs:36:19
note: Run with `RUST_BACKTRACE=1` for a backtrace I found that an old Oracle installation had continued to leave environment variables set:
% env | grep oracle
JAVA_HOME=/usr/lib/jvm/java-8-oracle
J2REDIR=/usr/lib/jvm/java-8-oracle/jre
DERBY_HOME=/usr/lib/jvm/java-8-oracle/db
J2SDKDIR=/usr/lib/jvm/java-8-oracleunsetting those made javaws pick up the non-Oracle JRE.
Same Issue, I just change default java by:
cd /usr/lib/jvm/
rm default-java
sudo ln -s java-1.8.0-openjdk-amd64 default-java # need install openjdk-8-jdk
javaws your.jnlp # it works. 1 I fixed this by setting the jdk8 directory in icedtea control panel. I opened the control panel, went to JVM settings and filled the field with:
/usr/lib/jvm/java-8-openjdk-amd64
I am running Ubuntu 18.04, and have both jdk11 and jdk8 installed. Normally, java-default is linked to jdk11 so icedtea will crash due to some classes being removed.
On Java11, jawaws is not supported as on Java 8. (I have openjdk and still couldn't use it)
One way out is to use some docker as this one:
It runs the firefox in the docker container and opening the icedtea in order to use KVM console from its url worked out for me.
I am not much of a geek but since previous answers are very old I am posting new answer
OpenJDK 8/11 didn't work for me, I have found the above link in GitHub for the same issue. I was able to open Jnlp files from lab live using openwebstart.
Note : My answer is related only to lab live Jnlp files and this is the first time I am using JNLP files
Thanks