(Solved) "Error: JavaFX runtime components are missing, and are required to run this application"

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
ramk

(Solved) "Error: JavaFX runtime components are missing, and are required to run this application"

Post by ramk »

Hi

Solution / Resolution - Added 12th August 2019 (12:12 Indian Standard Time) see new reply
Added on 27th July 2019 (15:15 Indian Standard Time)
Below is the original post. However the 3 reply has the correctly identified issue - am unsure if it should be a new thread or here. So am placing it in this thred

Original Post
Error 1 - while running Java

Code: Select all

$ ./ITR.sh
Error: JavaFX runtime components are missing, and are required to run this application
Error 2 -

Code: Select all

$ ./ITR.sh 
Error: Could not find or load main class com.itd.efiling.offline.common.player.ctrl.ThreeRedLightsIlluminate
Am trying to run a Jar file related to Income Tax Filing (in india). There are different forms (hence different JAR files available)

I tried running two different forms (ITR3 and ITR 4 https://www.incometaxindiaefiling.gov.i ... s?lang=eng) and both give different errors

I checked this [SOLVED] Can't run .jar files with JavaFX while having openjfx installed viewtopic.php?f=47&t=293529&p=1631235&h ... x#p1631235 but the solution there does not resolve the issue for me . However am posting some of the details asked for in that query.

I also tried different version of Java / openjdk but the error returned are the same

Other system Details provided are
1. Java Versions installed and available
2. Java /openjfx version installed and path
3. Inxi -Fxzd

Java Versions installed

Code: Select all

$ sudo update-alternatives --config java
     There are 3 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                                            Priority   Status
------------------------------------------------------------
  0            /usr/lib/jvm/java-11-openjdk-amd64/bin/java      1111      auto mode
  1            /usr/lib/jvm/java-11-openjdk-amd64/bin/java      1111      manual mode
* 2            /usr/lib/jvm/java-12-oracle/bin/java             1091      manual mode
  3            /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java   1081      manual mode
OpenJFX

Code: Select all

$ apt list --installed openjfx -a
Listing... Done
openjfx/bionic-updates,bionic-security,now 11.0.2+1-1~18.04.2 amd64 [installed]
openjfx/bionic 8u161-b12-1ubuntu2 amd64

System Info

Code: Select all

~$ inxi -Fxzd
System:    Host: ram-ThinkPad-X240 Kernel: 4.15.0-55-generic x86_64 bits: 64 gcc: 7.4.0
           Desktop: MATE 1.20.1 (Gtk 3.22.30-1ubuntu4) Distro: Linux Mint 19 Tara
Machine:   Device: laptop System: LENOVO product: 20AMS06D00 v: ThinkPad X240 serial: N/A
           Mobo: LENOVO model: 20AMS06D00 serial: N/A UEFI [Legacy]: LENOVO v: GIET73WW (2.23 ) date: 04/10/2014
Battery    BAT1: charge: 29.5 Wh 78.2% condition: 37.7/47.5 Wh (79%) model: LGC 45N1735 status: Discharging
CPU:       Dual core Intel Core i5-4300U (-MT-MCP-) arch: Haswell rev.1 cache: 3072 KB
           flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 9977
           clock speeds: max: 2900 MHz 1: 1232 MHz 2: 1103 MHz 3: 1030 MHz 4: 1074 MHz
Graphics:  Card: Intel Haswell-ULT Integrated Graphics Controller bus-ID: 00:02.0
           Display Server: x11 (X.Org 1.19.6 ) drivers: modesetting (unloaded: fbdev,vesa)
           Resolution: 1366x768@60.00hz
           OpenGL: renderer: Mesa DRI Intel Haswell Mobile version: 4.5 Mesa 19.0.2 Direct Render: Yes
Audio:     Card-1 Intel 8 Series HD Audio Controller driver: snd_hda_intel bus-ID: 00:1b.0
           Card-2 Intel Haswell-ULT HD Audio Controller driver: snd_hda_intel bus-ID: 00:03.0
           Sound: Advanced Linux Sound Architecture v: k4.15.0-55-generic
Network:   Card-1: Intel Ethernet Connection I218-LM driver: e1000e v: 3.2.6-k port: 3080 bus-ID: 00:19.0
           IF: enp0s25 state: down mac: <filter>
           Card-2: Intel Wireless 7260 driver: iwlwifi bus-ID: 03:00.0
           IF: wlp3s0 state: up mac: <filter>
Drives:    HDD Total Size: 256.1GB (88.6% used)
           ID-1: /dev/sda model: SanDisk_SDSSDHP2 size: 256.1GB temp: 40C
           Optical: No optical drives detected.
Partition: ID-1: / size: 22G used: 18G (87%) fs: ext4 dev: /dev/sda2
           ID-2: /home size: 208G used: 189G (96%) fs: ext4 dev: /dev/sda1
           ID-3: swap-1 size: 5.77GB used: 0.00GB (0%) fs: swap dev: /dev/sda4
RAID:      No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors:   System Temperatures: cpu: 50.0C mobo: N/A
           Fan Speeds (in rpm): cpu: 2587
Info:      Processes: 210 Uptime: 34 min Memory: 1828.8/7668.5MB Init: systemd runlevel: 5 Gcc sys: 7.4.0
           Client: Shell (bash 4.4.201) inxi: 2.3.56 
Thanks and looking forward to some advice
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 3 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
ramk

Re: Java -""Error: JavaFX runtime components are missing, and are required to run this application"

Post by ramk »

Hi

So an update

I ran Linux Mint 18.1 as a live session. By default it has openjdk-8-jre installed .
When I ran the .jar file it provided the same error message - however I then instaled openjfx and after that the file opened as it should.


So it seems the issue is the the later versions of openjdk (i.e beyond 8) that for some reason are preventing the application from running smoothly

Now the questions is can i purge / remove all files related to java and just reinstall open-jdk8 and get the files work

Will let you know how this goes and after this will see if this should me marked as solved or "worked around"
ramk

Re: (Issue Identified but Unsolved) "Error: JavaFX runtime components are missing, and are required to run this applicat

Post by ramk »

PROBLEM IDENTIFIED
*CRUX of what seems the issue**
Tha openjdk-8 which is the selected environment is not able to "call" on the correct version of openjfx installed (which is openjfx/bionic 8u*

But am unable to resolve it.

##DETAILED##
So the original error message is

Code: Select all

Error: JavaFX runtime components are missing, and are required to run this application
This is to run a Tax software that requires JRE (Java Runtime Environment) Version 8 with latest updates

After a lot of searching and not being able to come across a solution I tried to see if an older Linux Mint version would run the software.
So Ran a live session of Linux Mint 18.
The live session has openjdk environment installed by default. But returned the same error message as in the title.
*however* installing the default openjfx version in the available default repositories then also installed openjdk-8 (and related software) which in turn enabled the required Tax software to run.

I replicated the same in two more live sessions as well as in the latest Linux Mint 19 (Mate).

In each case the following parameters were consistent
Live Session Linux Mint 19.1

**
By default Openjdk-11 is on

then i installed openjfx which automatically installs openjdk-8

then the ITR software works

****
Current Config is

Code: Select all

$ java -version
openjdk version "1.8.0_162"
OpenJDK Runtime Environment (build 1.8.0_162-8u162-b12-1-b12)
OpenJDK 64-Bit Server VM (build 25.162-b12, mixed mode)

Code: Select all

$ apt list --installed openjfx -a
Listing... Done
openjfx/bionic,now 8u161-b12-1ubuntu2 amd64 [installed]

Code: Select all

~$ sudo update-alternatives --config java
There are 2 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                                            Priority   Status
------------------------------------------------------------
  0            /usr/lib/jvm/java-11-openjdk-amd64/bin/java      1101      auto mode
  1            /usr/lib/jvm/java-11-openjdk-amd64/bin/java      1101      manual mode
* 2            /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java   1081      manual mode


Press <enter> to keep the current choice[*], or type selection number: 
** NEXT STEP REPLICATING THIS ON THE INSTALLED 18.3 LINUX MINT**
First , I uninstalled any extra ppa's that I had (like the webupd8 repos etc)

then using this guide https://novicestuffs.wordpress.com/2017 ... rom-linux/
I uninstalled openjdk and opnjfx and manually found and deleted everything and anything to do with openjdk.


I then reinstalled openjdk-11 (and associated files)
After that installed openjfx but here it did not autoinstall openjdk-8 (and associated files)

However I still end up with the same error (as in the title)

**CRUX of what seems the issue**
Tha openjdk-8 which is the selected environment is not able to "call" on the correct version of openjfx installed (which is openjfx/bionic 8u*

Because under lve sessions it works everytime however in each case the openjfx is version openjfx/bionic 8u*

Below is the output of the current openjfx environment - and I am not unable to find how to make sure the openjfx/bionic 8u* is the selected openjfx environment

Code: Select all

$ apt list --installed openjfx -a
Listing... Done
openjfx/bionic-updates,bionic-security,now 11.0.2+1-1~18.04.2 amd64 [installed]
openjfx/bionic 8u161-b12-1ubuntu2 amd64
***
**WORKAROUND**
Right now the long way to get my work done is to work through a Live Session.

I thought, that maybe, doing a fresh install of an OS might work but am pretty sure that as soon as I run the first updates the software will get upgraded and the conditions will change and the software won't work anymore.

However would like to know if its possible to resolve this on the already installed session. I guess very specifically (if the problem is identified correctly) how to make sure the correct openjfx works

Thank you
tagMacher

Re: (Issue Identified but Unsolved) "Error: JavaFX runtime components are missing, and are required to run this applicat

Post by tagMacher »

I found your attempts and info illuminating. I have the exact same need to file tax returns but on Ubuntu Linux 18.04 LTS 64-bit where Java 11 is default but openjdk 8 can be installed; openjfx 11 alone is available in the repos.
I have solved my issue by getting the Java 8 jre from https://www.oracle.com/technetwork/java ... 33155.html; I have the tar.gz version expanded in /opt and am able to do

Code: Select all

/opt/jre1.8.0_221/bin/java -jar ./ITR-1_AY201920_PR4.1.jar
However, Oracle insists that one register before permitting jre download.
ramk

Re: (Solved) "Error: JavaFX runtime components are missing, and are required to run this application"

Post by ramk »

Hi tagMacher

Thanks,

I just saw your reply

In the mean time I got help from a friend who is very experienced and since I was able to provide him with the exact problem it took about 5 minutes to solve.

***
If any one is interested in the exact sequence of commands, trial and errors and eventual success they may please see the attached file which has the Summary and Sequence of commands used to identify the correct packages and install them
**
The solution was eventually really simple but something I needed to learn

using apt-get -V to get the versions available

and then using the same installed the appropriate version of openjdk 8, openjfx 8 and the related "correct" dependencies.

The sequence of commands is given below

Code: Select all

# apt-cache show openjfx
after finding the correct version then

Code: Select all

# apt-get -V install openjfx=8u161-b12-1ubuntu2
when finding that wrong versions were being installed continued to check each package

as in -

Code: Select all

# apt-cache show libopenjfx-java
the after finding all the appropriate packages and dependencies the following was run (after appropriate trial and errors to arrive at the exact ones that needed installation

Code: Select all

apt-get -V install openjfx=8u161-b12-1ubuntu2 libopenjfx-java=8u161-b12-1ubuntu2 libopenjfx-jni=8u161-b12-1ubuntu2
After that the Software works as required

**

Code: Select all

$ java -version
openjdk version "1.8.0_222"
OpenJDK Runtime Environment (build 1.8.0_222-8u222-b10-1ubuntu1~18.04.1-b10)
OpenJDK 64-Bit Server VM (build 25.222-b10, mixed mode)

Code: Select all

# update-alternatives --config java
There is only one alternative in link group java (providing /usr/bin/java): /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
Nothing to configure.
rpattabi

Re: (Solved) "Error: JavaFX runtime components are missing, and are required to run this application"

Post by rpattabi »

I registered in this forum just to thank @ramk. Your detailed post saved me lot of headache while filing the returns at the last minute. Just last week, I wiped out windows. Thank you.

I wonder if there is a way we could help each other every year as I expect income tax's dev could throw some surprises for linux users (may be due to lack of testing).
droopy4u

Which JavaFX / openjfx versions are AVAILABLE to install??? -- "Error: JavaFX ..."

Post by droopy4u »

ramk wrote: Mon Aug 12, 2019 2:54 am ...
The solution was eventually really simple but something I needed to learn

using apt-get -V to get the versions available

and then using the same installed the appropriate version of openjdk 8, openjfx 8 and the related "correct" dependencies.

The sequence of commands is given below

Code: Select all

# apt-cache show openjfx
after finding the correct version then

Code: Select all

# apt-get -V install openjfx=8u161-b12-1ubuntu2
when finding that wrong versions were being installed continued to check each package

as in -

Code: Select all

# apt-cache show libopenjfx-java
the after finding all the appropriate packages and dependencies the following was run (after appropriate trial and errors to arrive at the exact ones that needed installation

Code: Select all

apt-get -V install openjfx=8u161-b12-1ubuntu2 libopenjfx-java=8u161-b12-1ubuntu2 libopenjfx-jni=8u161-b12-1ubuntu2
After that the Software works as required
How can I figure out which JavaFX / openjfx versions are available to install???

Your solution worked fine, but I rather would like to figure how I can define which version JavaFX / 'openjfx' is the best according the 'java' version, which is running on my system.

Code: Select all

$ java -version
openjdk version "1.8.0_252"
OpenJDK Runtime Environment (build 1.8.0_252-8u252-b09-1~18.04-b09)
OpenJDK 64-Bit Server VM (build 25.252-b09, mixed mode)
https://github.com/eclipse/paho.mqtt-sp ... -640882578
ERROR
has been compiled by a more recent version of the Java Runtime (class file version 54.0), this version of the Java Runtime only recognizes class file versions up to 52.0
the complete errror:

Code: Select all

Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: javafx/application/Application has been compiled by a more recent version of the Java Runtime (class file version 54.0), this version of the Java Runtime only recognizes class file versions up to 52.0
I know you wrote : by ' trial and error'.

So I followed your information and tried out for version '8u252-b09', but without success:

Code: Select all

$ sudo apt-get -V install openjfx=8u252-b09-1ubuntu2 libopenjfx-java=8u252-b09-1ubuntu2 libopenjfx-jni=8u252-b09-1ubuntu2
   
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Version 8u252-b092-1ubuntu2' for 'openjfx' was not found
E: Version '8u252-b09-1ubuntu2' for 'libopenjfx-java' was not found
E: Version '8u252-b09-1ubuntu2' for 'libopenjfx-jni' was not found
But how did you find that the version '8u161-b12' is available?

Code: Select all

apt-get -V install openjfx=8u161-b12-1ubuntu2 libopenjfx-java=8u161-b12-1ubuntu2 libopenjfx-jni=8u161-b12-1ubuntu2
The installed versions

Code: Select all

$ apt-cache policy openjfx        
openjfx:
  Installed: 8u161-b12-1ubuntu2
  Candidate: 11.0.2+1-1~18.04.2
  Version table:
     11.0.2+1-1~18.04.2 500
        500 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages
        500 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages
 *** 8u161-b12-1ubuntu2 500
        500 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
        100 /var/lib/dpkg/status
If I search via the package on the site; for openjfx, I don't find '8u161-b12-1ubuntu2'
https://packages.ubuntu.com/search?suit ... chon=names
sanjay108
Level 1
Level 1
Posts: 2
Joined: Sun Aug 23, 2020 12:13 pm

Re: (Solved) "Error: JavaFX runtime components are missing, and are required to run this application"

Post by sanjay108 »

I am a complete newbie and this is the solution which worked for me. I am using linux mint 19.3
Please let me explain

On the desktop I have ITR folder which is unzipped folder from the IT dept website, their java module file.

Downloaded jre-8u261-linux-x64.tar.gz from oracle website . I had to register to get the file.

Extracted and moved it to /usr/lib/jvm/ and then it is (For this you will need root priviliges)

/usr/lib/jvm/jre1.8.0_261

Now i right clicked the ITR folder on desktop and opened it in terminal and typed this command

/usr/lib/jvm/jre1.8.0_261/bin/java -jar ITR-2_AY202021_PR1.3.jar

where

ITR-2_AY202021_PR1.3.jar is the respective program from the income tax dept. Yours may differ depending upon the tax return forms.

It worked and I could open the program.

(Please note you have to right click ITR-2_AY202021_PR1.3.jar and in permissions make it executable)

I hope it solves for others
actinium15

Re: (Solved) "Error: JavaFX runtime components are missing, and are required to run this application"

Post by actinium15 »

I joined specifically to answer how to get this done without:
  • wiping existing openjdk installations by installing Oracle JDK 8 or lower
  • worrying about creating and restoring the JDK environments
Steps:
  1. Head over to https://gluonhq.com/products/javafx/ and download the OpenJFX SDK compliant with your JDK install
  2. Extract it in any folder (I did it in the PWD)
  3. execute:

    Code: Select all

    java --module-path javafx-sdk-11.0.2/lib --add-modules javafx.web,javafx.fxml -jar ITR-2_AY202021_PR3.2.jar
pal2ie
Level 1
Level 1
Posts: 3
Joined: Mon May 11, 2015 3:58 am

Re: (Solved) "Error: JavaFX runtime components are missing, and are required to run this application"

Post by pal2ie »

Thank you so much! This worked for me
ramk wrote: Mon Aug 12, 2019 2:54 am Hi tagMacher

Thanks,

I just saw your reply

In the mean time I got help from a friend who is very experienced and since I was able to provide him with the exact problem it took about 5 minutes to solve.
...
Locked

Return to “Software & Applications”