J
J
JavaCat2020-03-27 14:33:08
Java
JavaCat, 2020-03-27 14:33:08

Why do I get the error "Error: JavaFX runtime components are missing, and are required to run this application" when I run a JAR file?

Good afternoon. I am new to programming. My task is to create a JAR file from the simplest JavaFX project. The file is created without problems, but when I try to run it, I get the error "Error: JavaFX runtime components are missing, and are required to run this application" . It's been two days since I tried to fix the problem. Help me please.
All settings and JAR creation process can be seen in the screenshots.

5e7de3e203556374892216.png

5e7de3f999108791480978.png

5e7de3ff4a34d993138695.png

JAR Creation
5e7de403b509d145218597.png

5e7de41f65be5310742207.png

The result after trying to run the JAR.
5e7de4293bfbb852257814.png

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
alivedeath, 2020-06-03
@alivedeath

Here is the official article from Intellij IDEA on how to create a project with JavaFX: https://www.jetbrains.com/help/idea/javafx.html
ps After installing the JavaFX library, you need to set up a virtual machine in IDEA, everything is described in the article, nothing too complicated this is not.

O
Orkhan, 2020-03-28
Hasanly @azerphoenix

Error: JavaFX runtime components are missing, and are required to run this application

The answer lies in the error and if you google, you will find a solution.
Briefly about the main thing - you will need this https://openjfx.io/openjfx-docs/
You are using Java 14 version. Starting with (I think) version 11 they have removed JavaFX and it is available as a standalone module. Accordingly, it is banal in your jar'nik and is not.

S
Sergey Shvyrev, 2020-03-27
@CellycoMobiles

Is there a version with gredl or maven? I moved to VsCode a long time ago. I do not remember how the idea collects there.
You need to verbose a build. See what the idea brings to you. There must be some sort of log.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question