Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Java Build a JavaFX Application Graphical User Interfaces Getting Started

How to fix JavaFx(X) by error application!

Hi, I am using latest Java jdk 14 and my IntelliJ is complaning something with application is missing. I remember Craig said that if you are using Java jdk 8 then you need to get JavaFx 8?

plz help

1 Answer

WELL I HAVE SOLVE IT OUT!! WOHOO šŸ„³


STEP 1: Calm down and go to webbsite JavaFx and download exacly the version you have in Java jdk. Example I am using Java jdk 14 so I need to get SDK JavaFx 14 my screenshot/ image link


STEP 2: Download the latest JavaFx which means I have to download nr 14 not lower or higher!! my screenshot/ image link


STEP 3: Go to your folder download and unfold the zip and then copy and past in Java file C:\Program Files\Java\

my screenshot/ image link


STEP 4: Open your wonderful first time project Sup šŸ˜‰ and go to Project Structure -> Libraries -> Click plus -> Java

Then find the folder where your have paste the file recently and click on folder lib -> ok

my screenshot/ image link my screenshot/ image link


STEP 5: Wonderful, now just press Apply and ok and let's hope it is working my screenshot/ image link

if it is not working DON'T WORRY! šŸ™ƒ


STEP 5: Open the Edit Configuration from Run my screenshot/ image link

then write on the VM options write: --module-path "C:\Program Files\Java\javafx-sdk-14\lib" --add-modules=javafx.controls,javafx.fxml

āš ļø: If you have copied don't forget to check your fx folder in C:\Program Files\Java\YOUR FX FOLDER! \lib my screenshot/ image link

Click apply and ok

Now run the file and let me know if it is working!! šŸ˜

Please give me a vote up!! šŸ… šŸ„³