I just wanted to say thank you so so so so much. I've been trying to resolve this issue for 4 days now and your solution was exactly what I was looking for. You've earned a subscriber. Thank you once again.
Hi, i know this video is 1 year old and this is a long shot but here it goes. Can you please point me to how to make an installer for java 12 javafx application with the jre. Or make an installer that that instals the jre if the machine does not have it?
Hi, here's something that might help. It doesn't address what you want directly, but it allows your javafx app to run without any dependencies (so no need for jre): ruclips.net/video/3lNQhbg1y4Y/видео.html
Sir, I have followed your two lectures in youtube and also able to run javafx 11 in intelliJ. I have also made jar files as per your video. But there is a small problem I have observed such that it fails to load fxml when it is made as jar file. It has some issue with fxml, I guess. It makes jar with out error and also runs in editor with no fail. The main issue is on execution part of independent jar that contains fxml. When I type java -jar JavaFX11-example-1.0-SNAPSHOT.jar,it ended up with error message. I have emailed you the details . Please have a look at it. Thanks
At the end of this tutorial, you say something to the effect that "if the computer has java 11, this jar file will run". I thought the whole idea of java 9 and beyond was to bundle the java runtime so that there was no need to make sure the target computer had the right JRE. Does your program bundle the JRE when you run maven? If not, how do you go about doing that with these JavaFX example apps? Thanks.
No, JRE is not bundled when running maven in this tutorial, just JavaFX. The generic answer is to attempt to use something like Launch4j which would bundle the JRE. For JavaFX specific native installers, you could go with github.com/javafx-maven-plugin/javafx-maven-plugin but I am not entirely sure if the JRE goes with it. So my answer is at the moment I don't know, need to do some digging around.
I've tried it with JavaFX 11, doesn't seem to work well as it tries to access com.sun.javafx.tools.ant which would have probably been fine before 9. Let me know if you can get it to work.
@@DanHowardMtl It was written by me. I also tried Maven explorer run configuration for building jar . It makes jar with out error. But it doesn't run on click
@Dan Howard There is a small problem I have observed such that it fails to load fxml when it is made as jar file. It has some issue with fxml, I guess. It makes jar with out error and also runs in editor with no fail. The main issue is on execution part of independent jar that contains fxml. When I type java -jar JavaFX11-example-1.0-SNAPSHOT.jar,it ended up with error message.
Thank you
i was searching solution for 6 hours
you are my savior
I had lost all hope on javafx ,you built it back .
❤️❤️❤️❤️❤️❤️
OMG I've researched this for almost a week!!!! Your little "launcher" idea saved my day ;)))))
U saved my life ,thank you
Thanks was looking for a solution for a while
Great info and from a humble NYC JavaFX GUI guy. Your solution is so much better than mine
I just wanted to say thank you so so so so much. I've been trying to resolve this issue for 4 days now and your solution was exactly what I was looking for. You've earned a subscriber.
Thank you once again.
Awesome, it worked like a charm. Thank you
Thank you so much
Thak u very very much
Thank you a lot, it helped)
Thank you so much! When I build it using docker container, it bundled Linux related things, and the app did not run on windows. Thx!
Thanks for the clear tutorial, but is there a way to change the application name? it says "sample.Main" on the toolbar.
Hi, i know this video is 1 year old and this is a long shot but here it goes. Can you please point me to how to make an installer for java 12 javafx application with the jre. Or make an installer that that instals the jre if the machine does not have it?
Hi, here's something that might help. It doesn't address what you want directly, but it allows your javafx app to run without any dependencies (so no need for jre): ruclips.net/video/3lNQhbg1y4Y/видео.html
Thank you! I tried to do this all last week. I only needed to add launcher) But why it doesn't work without launcher?
Please see this answer: stackoverflow.com/questions/52569724/javafx-11-create-a-jar-file-with-gradle
Sir, I have followed your two lectures in youtube and also able to run javafx 11 in intelliJ. I have also made jar files as per your video. But there is a small problem I have observed such that it fails to load fxml when it is made as jar file. It has some issue with fxml, I guess. It makes jar with out error and also runs in editor with no fail. The main issue is on execution part of independent jar that contains fxml. When I type java -jar JavaFX11-example-1.0-SNAPSHOT.jar,it ended up with error message. I have emailed you the details . Please have a look at it. Thanks
I have a javafx app done and ready but i cant deploy it or build jar or exe file
try with launch4j
It gives and Error: JavaFX runtime components are missing, and are required to run this application
org.apache.maven.plugins
maven-shade-plugin
3.2.1
package
shade
Copy this to your pom.xml. Works perfect for me. I was struggling with the same error. And of course launch class is needed
@@blue1809 I understand. Thanks you🙃
At the end of this tutorial, you say something to the effect that "if the computer has java 11, this jar file will run". I thought the
whole idea of java 9 and beyond was to bundle the java runtime so that there was no need to make sure the target computer had the right JRE. Does your program bundle the JRE when you run maven? If not, how do you go about doing that with these JavaFX example apps? Thanks.
No, JRE is not bundled when running maven in this tutorial, just JavaFX. The generic answer is to attempt to use something like Launch4j which would bundle the JRE. For JavaFX specific native installers, you could go with github.com/javafx-maven-plugin/javafx-maven-plugin but I am not entirely sure if the JRE goes with it. So my answer is at the moment I don't know, need to do some digging around.
Bundling JRE with javafx 11 instructions have now been published at openjfx.io/openjfx-docs/#modular
@@AlmasB0
Okay, thanks for the link. I'll check it out.
Ken Ampel
Hello, would this work on AIX.
What is that command line thing you are running and how do i use it?
In case you're still in the dark about this, the command line window is "git bash"
IntelliJ also has an Artifact feature which builds native installers for each platform.
Nice! I've got to try that.
I've tried it with JavaFX 11, doesn't seem to work well as it tries to access com.sun.javafx.tools.ant which would have probably been fine before 9. Let me know if you can get it to work.
@@AlmasB0 Cool. I haven't tried it with 11. Is it the same as this youtrack.jetbrains.com/issue/IDEA-201435 ?
@@DanHowardMtl It was written by me. I also tried Maven explorer run configuration for building jar . It makes jar with out error. But it doesn't run on click
@Dan Howard There is a small problem I have observed such that it fails to load fxml when it is made as jar file. It has some issue with fxml, I guess. It makes jar with out error and also runs in editor with no fail. The main issue is on execution part of independent jar that contains fxml. When I type java -jar JavaFX11-example-1.0-SNAPSHOT.jar,it ended up with error message.