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

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome everyone today i'm going to show you how to set up javafx to work in eclipse i already have a video about it but a lot of newer comments were about some errors so i just wanted to make a new one for 2021 so let's get started the first thing you want to do is you go to help and then you click eclipse marketplace and once it loads up just wait a bit and then type fx and press enter and you should install this one so just click install and it takes some time you wait a bit okay and once you get to this screen you just click accept and finish and now you again have to wait as you can see in the bottom right corner you just have to wait a bit and then the eclipse will offer your restart option okay and once this screen appears just click restart now and then we'll go to the next chapter and once you have done that the next thing you can now do is you can go to file new other and you can actually find javafx now because we install the plugin and we choose javafx project and click next and you enter your project name i'll just use test you choose your settings click next i usually exclude model info because it it's not really useful right now and i click finish and now let me remove this and now we have our javafx project but as you can see we have an error because our eclipse doesn't know where javafx is so we actually haven't yet downloaded and installed javafx we just set it up to work in eclipse and now we have to download to our computer so the next thing we will do is just that so the next thing we want to do is download javafx to our computer and you go to this page you can find the link in the description and you can actually pick two versions now you can pick the one with the long term support or the latest release i will use the latest release but if you get some errors it's maybe because of the javafx version so you can actually try downloading this one instead of this one which we'll use right now so just click download okay once you have downloaded the file now we need to extract it to some locations so just click open it and we will extract this to any location i will use disk c and name it java fx it's not important where you where you extract it but you need to remember the location because we will actually need to use those files and i will click ok and now just wait and let's go to the next chapter the next thing we have to do is to create an user library so the way you do that is you go to window preferences and in here you type user and you go to java buildpad user libraries and you click new you can use any name you want i'll call it javafx click ok and then click on it and then click add external jars and now where you want to go is to your location where you saved javafx so mine is here i'll just copy this path so this this is where we extracted our folder so you go inside and you go to lib and then you can copy go to add external jars paste it in here enter and now you just take all of them and click open and then just click apply and close and now we have the tools to solve the errors i showed you on the start so you go to test to your to your project folder you click right click build path configure build path then you go to libraries and then you click class path add library user library next you add your library which we just created and click finish click apply and apply and close and the errors should go and now if you run your program it still won't work because we have to add some arguments to our virtual machine so you go to main so here click on it and then you find this checkbox which says run main but don't click run click this expand and go to run configurations and then in here at java application main you go to arguments and in here you pass these arguments so i already passed them and it works for me and now you need to add them so when you get here it will be empty and then you can copy and paste this from my description but you have to change this path to where you extracted the folder that we downloaded and as you can remember i extracted it to see javafx so go to that folder and make sure to include the lib and pass it in quotes so you can just copy and paste this from my description and then you also add this and it all will be in the description so just copy and paste and change this here and then you click apply and run so i'll just run it because i already have set it up so run and a window should appear okay it got to my other screen but this is the javafx window the usual window that corresponds with this line of code so we can actually now add a title we can add buttons and you can start creating your application and that is it i hope this video was helpful if you need any help let me know down in the description and make sure to subscribe to support the channel see you you
Info
Channel: Java Coding Community - Programming Tutorials
Views: 37,864
Rating: undefined out of 5
Keywords:
Id: bk28ytggz7E
Channel Id: undefined
Length: 6min 37sec (397 seconds)
Published: Sun Feb 28 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.