How to Set Up JavaFX to work in Eclipse | Newest 2021 version | JavaFX Beginner Tutorial

preview_player
Показать описание
Setting up JavaFX so it works in Eclipse | JavaFX Eclipse Tutorial
How to set up JavaFX in Eclipse - Beginner JavaFX Tutorial

Today I am going to show you how to set up JavaFX in Eclipse. We will be using newest JavaFX and Eclipse version, but the process is similar on all versions so don’t be afraid.
So the first thing we are going to do is install eclipse plugins for JavaFX called e(fx)clipse or efxclipse.

Help -- Eclipse MarketPlace -- and search e(fx)clipse and click Install.
Now, we have our eclipse set up and the plugins we need.
And now we have a new option in Eclipse -- File -- New -- Other -- JavaFX project.

Find the latest version and click download, once it has downloaded you want to extract it to a folder, it can be any folder, and remember its location.

Next thing we’ll be doing is creating an user library.
Window -- Preferences -- User Libraries -- New -- Call it JavaFX

Next, we need to set up the run configuration by adding:

TIMESTAMPS:
0:00 - E(fx)CLIPSE Plugin Installation
1:05 - Creating a new JavaFX Project
2:05 - Downloading and cofiguring JavaFX
3:08 - Creating User Library
4:12 - Adding JavaFX to Eclipse
4:42 - Configuring Build Path and Arguments
5:54 - Running the program
6:17 - Outro

Arguments: --module-path "your-path\lib"
Рекомендации по теме
Комментарии
Автор

Just to confirm what some others have said, in Eclipse 2022-03 (4.23.0) I had to add the library to the modulepath instead the classpath to get it to work. Otherwise, this video is very helpful.

Wicasta
Автор

I can't get it to run if I include the user library in classpath. It works if I add it to modulepath though. I'm not sure why.

taylrobe
Автор

worked!! been tryna find this for 3 hours straight. bless you

thisisaegis
Автор

Thanks helped a lot! In Eclipse 2022-03 (4.23.0) I had to add the library to the modulepath instead the classpath to get it to work.

furkanzengin
Автор

At 6:36 if you dont see the "Main" just right click "Java Application" and then "New Configuration". Took me a while to realize that, hope I save time for others

orenraz
Автор

Thank you so much! My instructor neglected this part, so i had to find another source to figure this out.

pergos
Автор

A common bug can be observed even after successful installation and deployment that we are not able to see the window which used to appear after the execution of Main.java class. To resolve this issue of eclipse we can set in the arguments tab the option "-XstartOnFirstThread argument when launching with SWT" as unchecked while running as "Run as configuration".

ankitmathur
Автор

One of the best How-To videos I have seen. THANK YOU!!!

b.bgs
Автор

OMG!!! Thank you much!!! I've been trying to get this for a week and I can finally run the project T-T Thanks a lot for the video and to everyone else who commented the updates <3 <3

tealenko
Автор

Thanks. I was able to get it working. I had to do a few tricks not listed in the video, but after some research it did work. Thanks for your tutorial!

johnson
Автор

Thanks a lotttt, finally after trying everything, this tutorial came as a life saviour, and yes do as written in pinned comment, as i followed the pinned comment and the project is finally running. Thanks once again!

_mannkumark.pandya
Автор

Many thanks. I was missing the VM arguments and can finally run my javafx projects again. That helped a lot.

eMOElein
Автор

for who did not work for him, try adding the user library to the MODULE path not the CLASS path, and then proceed to do the rest

dawoodsiyam
Автор

Error occurred during initialization of boot layer
Module javafx.controls not found



This error is occurring when I install javafx in eclipse and run it.


Please help me.

bhavikprajapati
Автор

Thank you so much for this video. It saved me hours of frustration and allowed me to run JavaFX!

jennineoldis
Автор

Hello,
I have a problem. I was following your guide sep by step, but after creating the path from my project "test" the errors did not disappear, therefore my progra does not work. The error which occurs after running says
"Error occurred during initialization of boot layer
Module javafx.graphics not found" .
It would be nice if you yould help me. Thanks

duc-anhng
Автор

this was vey helpful my lecturer was missing something in his lecture about javafx setup and i found it here

imranhazim
Автор

Thank you so much.
After wasting many hours searching, downloading extras ...etc
This video has solved the problem.
Very easy to understand, and well organized.
I liked it and subscribed

aladdinalswaifi
Автор

I watched this video a few days ago but I was not able to fix the problem. Bcz I was doing mistake and the mistake was I was selecting the modulepath instead of classpath for javaFx. I tried it today and It worked. Your video really helped me bro I watched many videos but you did great job.

abrahman
Автор

When you add in the jar files, do not include the src file in Eclipse, or else you will receive an error that prints "Error occurred during initialization of boot layer".

Many thanks!

somecreativeperson