Stuart Boon
This guide is particularly helpful if you are looking at using Quarch Instrument Server(QIS), Quarch Power Studio(QPS), or Quarch Compliance Suite(QCS) on Ubuntu.
There are a number of users switching from using Official Java from Oracle to openJDK due to new SE subscription. In this post I will not be addressing the terms, as that has been done on countless other forums – instead, I will be giving an easy-to-implement solution to getting Quarch java applications running using OpenJDK.
QIS, QPS, and QCS are all Java 8 applications and require Java 8 to run them. The main issue with OpenJDK8 is that it doesn’t come with OpenJFX (the GUI Library that our applications use to display our user interface). There are a few solutions to add OpenJFX to your OpenJDK, but the simplest one I have found I have listed below:
We highly recommend using Amazon Corretto Java8. Corretto is a distribution of Open JDK with patches included by Amazon, it includes OpenJfx. So Installing Corretto fixes the issues mentioned down below.
https://docs.aws.amazon.com/corretto/latest/corretto-8-ug/generic-linux-install.html
If you can’t install Corretto for whatever reason here are instructions on how to get JFX for OpenJDK8 to allow you to run Quarch java based programs.
If you don’t have OpenJDK-8 already installed, install it using:
>sudo apt install openjdk-8-jdk
Use “sudo update-alternatives –config java” to see java versions installed and to change what version you are using to OpenJDK-8.
Use the following commands to get rid of any previous install of OpenJFX, install this specific version, and hold it to stop it from being updated:
- sudo apt purge openjfx
- If you want to install openjfx8 in 19.04 which is available in 18.04 at https://packages.ubuntu.com/bionic/arm64/openjfx/download.
- Append deb http://de.archive.ubuntu.com/ubuntu/ bionic main universe to /etc/apt/sources.list
- Do sudo apt update
- Install the packages: sudo apt install openjfx=8u161-b12-1ubuntu2 libopenjfx-jni=8u161-b12-1ubuntu2 libopenjfx-java=8u161-b12-1ubuntu2
- Mark hold to prevent upgrade: apt-mark hold openjfx libopenjfx-jni libopenjfx-java
- To prevent any other complications Remove deb http://de.archive.ubuntu.com/ubuntu/ bionic main universe from /etc/apt/sources.list
- Do sudo apt update
This solution was based on an answer found on stack overflow.
For Fedora 27 systems:
Open a terminal and type:
sudo dnf install java-1.8.0-openjdk-openjfx java-1.8.0-openjdk-openjfx-devel
You can now download our Java-based applications and run them. QIS and QPS are packaged inside our python API called Quarchpy. I would always recommend that you get QIS and QPS by installing python3 and then installing Quarchpy using pip. This means if there are any updates to QIS or QPS you will get them when you update Quarchpy, which is very easy to do. If you do not want to have Quarchpy on your system then you are able to download QIS and QPS separately from our website.
At the time this was written, the only way to download QCS client-side is from our website here.