If you export the project to a .jar file, you can run it when you click on it.
I assume that you know that the virtual machine must be installed on the computer on which the program is running. (A virtual machine is what allows java to be independent of the operating system)
And also you should know that if you convert this .jar to a .exe file using some kind of gadget ... Then java will no longer be java, because it will not be able to run it on operating systems without a window,
Remember the slogan java
'Record times in a row everywhere'
Check out this image here, I will explain to you how to create .jar using the eclipse environment:

1 - select the project in the package explorer
2-Choose "File"> "Export" from the menu
3-pick runnable jar file from dialog and
4-Click on and follow the rest of the wizard
source share