• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

JavaFX + Java11 respectively JDK11 + Eclipse Photon

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 37
1
MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

 
Sheriff
Posts: 7125
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is a good reference:

https://openjfx.io/openjfx-docs/
 
Knute Snortum
Sheriff
Posts: 7125
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Ranch Hand
Posts: 37
1
MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 78677
374
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well done
Woiuld you like to click the resolved button? I shall move the discussion to our FX forum.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I realize there is already a valid / workable answer but, I put together a detailed step by step post on this that I hope may help someone else that has a similar issue, particularly if they are trying to use Gradle in conjunction with Eclipse.

https://thecodinginterface.com/blog/javafx-dev-setup-gradle-and-eclipse/
 
We must storm this mad man's lab and destroy his villanous bomb! Are you with me tiny ad?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic