Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Eclipse 2018-09 and JavaFX 11 adventure(Error: JavaFX runtime components are missing, and are required to run this application)
Eclipse 2018-09 and JavaFX 11 adventure [message #1797185] Sat, 27 October 2018 07:28 Go to next message
Eitan Rosenberg is currently offline Eitan RosenbergFriend
Messages: 143
Registered: October 2018
Senior Member
Hello all !

I am using:
- Windows 10 64 bit
- Eclipse 2018-09 (4.9.0) Build id: 20180917-1800
- openjdk-11.0.1_windows-x64_bin.zip which I unzip and included under Installed JREs Preferences.
- Eclipse is running using jdk-10.0.2_windows-x64_bin.exe .
- I installed "Java 11 Support for Eclipse 2018-09" based on information from the market place
( http://marketplace.eclipse.org/content/java-11-support-eclipse-2018-09-49 )
I installed from http://download.eclipse.org/eclipse/updates/4.9-P-builds

Using openjfx.io/openjfx-docs/#maven as a reference I created a maven project with:

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.source>11</maven.compiler.source>
</properties>

Under <dependencies> I have:

<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>11</version>
</dependency>

I copied openjfx.io/openjfx-docs/HelloFX.java and it compiled with no problems .

The project does not use module-info.java !!!

When I try to run it I am getting:
Error: JavaFX runtime components are missing, and are required to run this application

This is odd since the compile went ok.

Next just for testing I created a Runnable JAR . I used "Package required libraries into generated JAR"

Since my JDK 11 is not included in my system path environment variable I created a shortcut (Windows) to the jar:

Target: C:\Java\jdk_11\bin\javaw.exe -jar java_11_tests.jar

Statrt in: K:\JavaAPPs\Java_11_Tests

I was VERY surprise to see that the program is working !!!

Can some one explain why I could not run the program in the IDE and run it as a Runnable JAR ?

Is something missing in Eclipse to support java FX 11 ?

I prefer not to use module-info.java for the time being.













Re: Eclipse 2018-09 and JavaFX 11 adventure [message #1797342 is a reply to message #1797185] Tue, 30 October 2018 06:22 Go to previous messageGo to next message
Sarika Sinha is currently offline Sarika SinhaFriend
Messages: 131
Registered: February 2010
Location: Bangalore, India
Senior Member
Do you have openjfx-11 jars on the classpath of Eclipse Project ?

OpenJDK-11 does not include javafx anymore, it comes as standalone.


Sarika Sinha
JDT Programmer
Re: Eclipse 2018-09 and JavaFX 11 adventure [message #1797419 is a reply to message #1797342] Tue, 30 October 2018 16:59 Go to previous messageGo to next message
Eitan Rosenberg is currently offline Eitan RosenbergFriend
Messages: 143
Registered: October 2018
Senior Member
Thanks for the response.

I am aware that javaFX 11 is a stand alone now.

If you look at my post you will see that:

- The project is Maven and I have the dependency needed.

- The code is compiled with no problem.

- a Runnable JAR is working !!! it containes the javaFX jars
index.php/fa/34195/0/
index.php/fa/34197/0/

- I get the message in the IDE when I use the regular run configuration
index.php/fa/34196/0/

Regards.
Re: Eclipse 2018-09 and JavaFX 11 adventure [message #1797436 is a reply to message #1797419] Tue, 30 October 2018 20:51 Go to previous messageGo to next message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1853
Registered: July 2009
Senior Member
Perhaps s.t. is not good in that launch configuration.
Luckily, the launch configuration dialog now has a button "Show Command Line" that shows you, how Eclipse is invoking your program. From there it should be easy to figure what is missing.
Re: Eclipse 2018-09 and JavaFX 11 adventure [message #1797470 is a reply to message #1797436] Wed, 31 October 2018 10:33 Go to previous message
Eitan Rosenberg is currently offline Eitan RosenbergFriend
Messages: 143
Registered: October 2018
Senior Member
index.php/fa/34208/0/index.php/fa/34207/0/Thanks for the response.

This is the "Show Command Line" output.
index.php/fa/34206/0/

The FX stuff is there....

But there is new development.

When I generate file module-info.java
index.php/fa/34207/0/

I have
index.php/fa/34208/0/

It is working !!!!

Also the -p is added (--module-path)

index.php/fa/34209/0/

Thank you !!!
Previous Topic:Should the same declaration type bindings have the same Java object?
Next Topic:Is it possible to use this feature in custom plugin?)
Goto Forum:
  


Current Time: Fri Apr 26 09:48:33 GMT 2024

Powered by FUDForum. Page generated in 0.03061 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top