Score:1

Making JNLP to work on Ubuntu 20.04

tr flag

I have been trying for long time to make this work but I have no working results. I understand that I have to install icedtea-netx for Ubuntu 20.04 but seems to not be sufficient. When I access my jnlp icedtea is launched but remains showing the logo. What could be the problem? Does icedtea work together with java installed? I have to install java 1.8.0 too, or what could be the problem? I will be happy if somebody could help me.

cocomac avatar
cn flag
I've gotten it working with IcedTea-Web + OpenJDK 11. Would that work for you?
antonio1 avatar
tr flag
same thing, freeze logo, do you have detailed steps how you installed IcedTea-Web + OpenJDK 11? If you have same OS ubuntu 20.04 should work.
cocomac avatar
cn flag
I almost have it working, I'll post an answer soon
antonio1 avatar
tr flag
great, thank you, I want to apply and see it working. Everywhere are lots of theories with no results, this thread hope to have an efective result.
Score:0
cn flag

Remove whatever Java and IcedTea packages/stuff you already have. I'm assuming a stock install of Ubuntu 20.04 LTS here, although 21.10 should work fine too.

First off, install the Java 11 JDK (we shouldn't need the JDK as we aren't compiling anything, but for some reason the JRE didn't work, so use the JDK regardless):

$ sudo apt update && sudo apt install openjdk-11-jdk
...

Check to make sure it is installed:

$ java --version
openjdk 11.0.13 2021-10-19
OpenJDK Runtime Environment (build 11.0.13+8-Ubuntu-0ubuntu1.20.04)
OpenJDK 64-Bit Server VM (build 11.0.13+8-Ubuntu-0ubuntu1.20.04, mixed mode, sharing)

Yay, now we have the Java 11 JRE installed (no, newer versions won't work, so you can't use 16 or 17. Java 8 works, but I prefer 11 as it supports HiDPI displays). Time to install IcedTea-Web. So... Ubuntu doesn't include it in the package repos. So the next best thing is to install it manually. Download the latest release of it from here. Specifically, you want the icedtea-web-X.Y.Z.linux.bin.zip file. Download it, and move the zip into an (empty) folder - I used ~/icedtea. Extract it with unzip icedtea-web-X.Y.Z.linux.bin.zip (use the correct filename here). You may have to install it with sudo apt update && sudo apt install unzip. Now there will be a folder called icedtea-web-image. Go into it. Now go into the bin folder (within icedtea-web-image). Run this to test IcedTea-Web

$ ./javaws -about

This will run the javaws (Java Web Start) binary included with IcedTea-Web, and -about has it pop up a small Java GUI app just to make sure everything works. If all goes well, you'll get the IcedTea-Web logo for a moment, followed by an about dialog that looks like this*:

IcedTea-Web about dialog

Now, you could just run any random .jnlp file this way (i.e., ~/icedtea/icedtea-web-image/bin/javaws somefile.jnlp). That's valid... and a bit annoying to type out the full path every time. Per this answer, we'll install it into /opt, and make a symlink in /usr/local/bin for the binaries. Go to wherever you extracted the zip to (for me, ~/icedtea). If you do ls here, you should see a folder named icedtea-web-image. Now, do sudo cp -r icedtea-web-image /opt. Now, in the /opt directory, there should be a folder called icedtea-web-image. Time to make the symlinks. Here are the links we'll make

Source Destination
/opt/icedtea-web-image/bin/javaws /usr/local/bin/javaws
/opt/icedtea-web-image/bin/itweb-settings /usr/local/bin/itweb-settings
/opt/icedtea-web-image/bin/policyeditor /usr/local/bin/policyeditor
$ sudo ln --symbolic /opt/icedtea-web-image/bin/javaws /usr/local/bin/javaws
$ sudo ln --symbolic /opt/icedtea-web-image/bin/itweb-settings /usr/local/bin/itweb-settings
$ sudo ln --symbolic /opt/icedtea-web-image/bin/policyeditor /usr/local/bin/policyeditor

Now that we've made the links, from your home directory (~), do javaws -about. If all went well, the about dialog (shown above) will pop up. Now, download your .jnlp file and save it somewhere (I'll assume it is ~/Downloads/somefile.jnlp). To run that file, just do javaws ~/Downloads/somefile.jnlp, and it should run! Sadly, this method doesn't support browser integration, but you can still run the .jnlp file manually.


*You may observe that those window borders aren't Ubuntu, but instead Windows 10. However, due to me not having a real Ubuntu install at the moment (I mostly use Arch for Linux), I'm testing this in WSL2. I have an X server setup (VcXsrv) that lets me run GUI apps in WSL2, which is why it looks like Windows. But, this is still real Ubuntu 20.04, just with the X server on Windows.

antonio1 avatar
tr flag
I'm following your procedure and I'll come back with an answer. I just want to mention that you described very well the steps, I really like following your procedure, hope to see it working. Just wait for my results. Thank you.
antonio1 avatar
tr flag
Here I am with results. Not OK, same situation with freezing even if everything worked great during the procedure. I have one question, why this icedtea instead of icedtea-netx? My reported error is: Exception in thread "TIM59 MMC Eml Applet" java.lang.RuntimeException: java.lang.NoClassDefFoundError: javafx/scene/Parent It seems to me that javafx is missing from the java package.
cocomac avatar
cn flag
@antonio1 Try `sudo apt update && sudo apt purge openjdk-11-jdk && sudo apt install openjdk-8-jdk` and see if that works. Java 11 removes JavaFX, and if you don't care about HiDPI support, doing that (to use Java 8 instead) might fix it. If it doesn't, see [this question](https://stackoverflow.com/questions/56166267/) for how to get JavaFX working with Java 8 (which you would have switched to)
antonio1 avatar
tr flag
Does not work by changing java version, same error with missing JavaFX. Also the indicated link which is for ubuntu 18.04 by installing openjfx, libopenjfx-jni and libopenjfx-java with the latest version because 8u161 not found, still not working. Maybe I have to declare some path somewhere in variables.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.