• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

JavaFX + Java11 respectively JDK11 + Eclipse Photon  RSS feed

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Guys,

I am struggling for two days now to create a "Hello JavaFX"-Project within my Eclipse IDE using JDK11. I got to know that JavaFX was decoupled this year from the JDK and it has to be integrated separately but it seems that there are no tutorials for that specific setting as described in the subject of this post. And since I am a newbie to that all, I do not not have the mental flexibility to fix and engineer all by myself with my Java- and IDE-Config - Experience so far.

So here are the resources I tried to use for my endeavour so far:

Downloaded JavaFX Library > Link

E(fx)clipse - Tutorial > Link

Do I need more components to start building JavaFX projects with Eclipse or are the above mentioned sufficient and do you know how to do the set-up properly? Do I maybe have to use an older version of Java respectively an older JDK (if yes, how can I easily switch between Java Version in Eclipse?)?

Sorry for asking so many questions, but it is getting a bit frustrating now xD.

Thanks for any feedback in advance.

Best regards
Marius
 
Greenhorn
Posts: 19
1
MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Marius,
It is a little difficult to judge where you are stuck from your description. First of all you can use Java 11 and the corresponding JavaFX 11 package, you do not have to use older versions.

As a first step I would suggest you check whether you have installed the "Java 11 for Eclipse" patch. Then check whether JavaFX has been included in the module path of your project.

 
Marshal
Posts: 5988
156
Chrome Eclipse IDE Java Postgres Database Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a good reference:

https://openjfx.io/openjfx-docs/
 
Knute Snortum
Marshal
Posts: 5988
156
Chrome Eclipse IDE Java Postgres Database Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, here is a small "bindings" demo that I wrote that uses JavaFX 11 and FXML if that helps.

https://github.com/ksnortum/javafx-bindings-demo
 
Marius Hille
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Jan Daermann wrote:Marius,
It is a little difficult to judge where you are stuck from your description. First of all you can use Java 11 and the corresponding JavaFX 11 package, you do not have to use older versions.

As a first step I would suggest you check whether you have installed the "Java 11 for Eclipse" patch. Then check whether JavaFX has been included in the module path of your project.



I installed x and x

Furthermore I added via the properties of a certain project to the module path all the .jar-files of fx. The imports are working fine now. So no error messages for those.

Now a new error message appears:

Could not find or load main class hellofx.HelloFx where hellofx is just the name of the single one package in the project and HelloFx is the single one class, which contains the following code:



Thanks for the hints, Jan.

I did some research for that error as well, but only got some information, that the package name probably is not included properly, which it actually is.

Is there any further hint for that problem?

Thanks in advance
 
Marius Hille
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Marius Hille wrote:
I installed x and x



Meaning:

> e(fx)clipse 3.0.0

> Java 11 support for Eclipse 2018-09 (4.9)
 
Jan Daermann
Greenhorn
Posts: 19
1
MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good Morning Marius,

try this:
Project -> Properties -> Run/Debug -> Browse Application Class -> Select class-> close and apply.

 
Marius Hille
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found a solution at StackOverflow

How to add javafx11 to eclipse

That is a step-by-step guide to integrate JavaFX 11 in Eclipse 4.9 using JDK 11 with a small "HelloFX"-Program, which is pretty cool.

Thank you guys!
 
Marshal
Posts: 64494
225
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well done
Woiuld you like to click the resolved button? I shall move the discussion to our FX forum.
 
WARNING! Do not activate jet boots indoors or you will see a tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!