JavaFX 14 (2020 Release) Introduction - Creating a new project with JDK 11 and JDK 14

Поделиться
HTML-код
  • Опубликовано: 1 окт 2024

Комментарии • 54

  • @GenuineCoder
    @GenuineCoder  4 года назад +8

    Hi friends,
    If you have been using JavaFX 8 and haven't tried any newer version, you definitely should checkout JavaFX 11 or later versions.
    From version 11 onwards, the project is completely opensource (github.com/openjdk/jfx) and there have been a lot of feature improvements and bugfixes. If you love JavaFX and like to keep updated regularly, you can follow Mr. Johan Vos on twitter (twitter.com/johanvos).

    • @carlosantoniomarroquin5520
      @carlosantoniomarroquin5520 4 года назад

      Thank you for the tutorial. Do you think you can make a video of how to create a standalone JavaFX app using the new JPackage? I've been trying to do that with JavaFX and SQLite but I can't.

  • @amarildo-xyz
    @amarildo-xyz 4 года назад +12

    any incoming tutorial on how to create an executable JavaFX app? (including dependencies like mysql, hibernate etc)

    • @chriscs9080
      @chriscs9080 4 года назад +1

      Why u need a video for that? Just like you would do with Java app lol

  • @GenuineCoder
    @GenuineCoder  4 года назад +3

    [Important point]
    A lot of people were asking why they are getting "Caused by: java.lang.NullPointerException: Location is required" error when building JavaFX with Gradle.
    It is because, the FXML, CSS, and similar non-java resources are not added to your package correctly.
    You can fix this by adding the following lines in your build.gradle file (This will include FXML, CSS and PNG(For icons) in your source set).
    sourceSets.main.resources.srcDirs("src/main/java").includes.addAll(["**/*.fxml", "**/*.css", "**/*.png"])
    sourceSets.main.resources.srcDirs("src/main/resources").includes.addAll(["**/*.*"])

    • @Raouf2684
      @Raouf2684 4 года назад

      Thank you bro, I have been strugling for about 48 hours straight now ! You saved me :D
      EDIT: NEW PROBLEM! When creating a jar file for distribution, the application does not launch, after several modificatins and tries, I have found the problem but not the solution: The program is still asking for the Location. I couldn't find the solution anywhere hopefully you can guide us through this problem.
      Many thanks to you for all your work, keep it up!

  • @caspiancode6477
    @caspiancode6477 4 года назад

    Check out how you can configure VS Code for Java and JavaFX development: ruclips.net/video/IPhqJh4ckWA/видео.html

  • @hakoamin9813
    @hakoamin9813 Год назад

    hi mate thanks a lot for the tuto can you help please with table-view I need to make the table cell size and height change depending on text size I will be so grateful for help thanks a lot

  • @samarmohan9891
    @samarmohan9891 4 года назад

    Download the JDK from Oracle, not Azul.

  • @hiteshinception
    @hiteshinception 4 года назад +1

    Hello Genuine Coder, please provide tutorial for JAVAFX 14 with Spring.

  • @geliangzhu9136
    @geliangzhu9136 4 года назад +1

    request. javafx 14 module + springframework/springboot + databases

  • @DavidGemVinoj
    @DavidGemVinoj 3 года назад

    Thank you...

  • @Mr_Brian
    @Mr_Brian 4 года назад +1

    These are the kind of things I've been waiting from you. Keep it up bro. How about a full java management software development from scratch with javafx 14 and MySQL? That would be very nice.

    • @GenuineCoder
      @GenuineCoder  4 года назад +3

      Thanks brother.
      I have prepared a new JavaFX 14 simple project from scratch. It will be released soon. But it doesn't have MySQL though.
      The reason why I am not doing another big project is, I already have a JavaFX SQL based (Derby) Library Management system tutorial series with 43 videos. So again going through same concepts and ideas is bit hard.

  • @sunhsiang6644
    @sunhsiang6644 3 года назад

    Love you 👍

  • @hazaristantv4289
    @hazaristantv4289 4 года назад

    Hi sir can you make tutorial on how to create custom jre with modular project with jasperreport. I tried but it give me automatic module error while creating custom jre

  • @MrJamdes
    @MrJamdes 4 года назад +1

    I love java, but taking half an hour to set up a Hello World is a pain in the ass.

    • @GenuineCoder
      @GenuineCoder  4 года назад +2

      Hi, Taking 22 minutes to explain this was my conscious decision/fault rather than JavaFX's. I wanted to explain each and everything for helping absolute beginners. For any person who is creating his project 2nd or later times, it won't take more than 1 minute to get the project initialized.
      Java is always developer-friendly if the developer knows it.

    • @MrJamdes
      @MrJamdes 4 года назад +4

      @@GenuineCoder Comrade, I understood, and I'm sorry if it seemed like a criticism of your work. I am grateful for people like you to publish this type of material, but even with an advanced level of knowledge it is still very much just to start a project (it may not take 20 minutes or even 5, but the number of steps is still huge). As I said I love Java, but it is far from being friendly.

  • @chaldunalder
    @chaldunalder 4 года назад +1

    Thanks for the info! Do you know how to export your java project into a standalone project that is able to run from the jar file?

    • @theStrategicRook
      @theStrategicRook 4 года назад

      I've set up my project like that. Maybe it'll help you - github.com/gravetii/wordagam

    • @amralmaqtry6622
      @amralmaqtry6622 4 года назад

      this video about how to export javafx 11 or 13 to excuteable jar file
      ruclips.net/video/HGHu-SzL-5E/видео.html

    • @chachakitareti1778
      @chachakitareti1778 4 года назад

      Me I know

  • @gTosca_666
    @gTosca_666 4 года назад +1

    Javafx 😎

  • @Blastpv
    @Blastpv 4 года назад

    please give a link to the picture of your desktop

  • @jaimedelgado5566
    @jaimedelgado5566 4 года назад

    Great JavaFX I work with this allways, I hope this and new releases

  • @vyctorhff40
    @vyctorhff40 4 года назад

    Bert good, thanks for sharing.

  • @glennadams7047
    @glennadams7047 4 года назад

    Nice video! Is there any free IDE you recommend to get started because Intellij costs $$$ ?

    • @aqibishaq885
      @aqibishaq885 3 года назад

      Use netbeans eclipse

    • @henrikstornblom
      @henrikstornblom 3 года назад +1

      Intellij is available as a community edition also. That is free.

  • @vastolord1752
    @vastolord1752 4 года назад

    Sir..
    Im using scenebuilder 11 with
    JDK 14 , Sdk 14 but
    In my Scenebuilder library
    I imported JFoenix 9.0 but i can only use few components ,
    When i used the other it appears error on my screen how do i do ?

    • @GenuineCoder
      @GenuineCoder  4 года назад +1

      What is the error you are getting?
      I just imported JFonix 9.0.9 to Scene Builder 11. It is working fine in my end.

    • @vastolord1752
      @vastolord1752 4 года назад

      @@GenuineCoder Sir, I can't use JFxProgressBar and JFXTextField and etc..
      When i used them and this appeared !
      Exception in Application start method
      java.lang.reflect.InvocationTargetException
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:564)
      at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:464)
      at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:363)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:564)
      at java.base/sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:1051)
      Caused by: java.lang.RuntimeException: Exception in Application start method
      at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:900)
      at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:195)
      at java.base/java.lang.Thread.run(Thread.java:832)
      Caused by: java.lang.IllegalAccessError: class com.jfoenix.skins.JFXProgressBarSkin (in unnamed module @0x6fd0aec5) cannot access class com.sun.javafx.scene.NodeHelper (in module javafx.graphics) because module javafx.graphics does not export com.sun.javafx.scene to unnamed module @0x6fd0aec5
      at com.jfoenix.skins.JFXProgressBarSkin.(JFXProgressBarSkin.java:64)
      at com.jfoenix.controls.JFXProgressBar.createDefaultSkin(JFXProgressBar.java:75)
      at javafx.controls/javafx.scene.control.Control.doProcessCSS(Control.java:897)
      at javafx.controls/javafx.scene.control.Control$1.doProcessCSS(Control.java:89)
      etc....

    • @GenuineCoder
      @GenuineCoder  4 года назад +1

      ​@@vastolord1752
      The problem is with the 'module' concept introduced with Java 9.
      This issue raised in JFoenix GitHub repo discuss this very issue: github.com/jfoenixadmin/JFoenix/issues/889
      Have a look at the issue thread and that should fix your issue.
      Related StackOverflow question: stackoverflow.com/questions/53037442/how-to-fix-jfoenix-modules-with-javafx-11

    • @vastolord1752
      @vastolord1752 4 года назад

      Thanks Sir !

  • @zandercittadin8328
    @zandercittadin8328 4 года назад

    Great explanation. Thank you.

  • @washingtonluis8081
    @washingtonluis8081 4 года назад

    Very good

  • @Manikandan-nn2bw
    @Manikandan-nn2bw 4 года назад

    First like and first comment 😎

  • @fabianodias10044
    @fabianodias10044 4 года назад

    nice, keep up the good work! by the way where are you from?

    • @GenuineCoder
      @GenuineCoder  4 года назад +1

      Thanks.
      I am from Kerala, India.

  • @codeflutterly
    @codeflutterly 4 года назад

    It will be cool to build a full project in javaFx 11+

    • @GenuineCoder
      @GenuineCoder  4 года назад

      Hi,
      A project is in the pipeline. It will be released soon.
      You can find the project in Github if interested: github.com/afsalashyana/Covid19-Desktop-Widget

    • @codeflutterly
      @codeflutterly 4 года назад

      @@GenuineCoder ok boss
      Can't wait

  • @tabish__ali
    @tabish__ali 4 года назад

    thanks sir, i have been using javafx 8 with jdk 8, now thinking that i might go for latest version.

    • @GenuineCoder
      @GenuineCoder  4 года назад

      You should definitely try migrating to JavaFX 11 or later.
      There has been a lot of changes since JavaFX 8. Moreover from 11 onwards, JavaFX (OpenJFX) is completely opensource.
      OpenJFX Project in Github: github.com/openjdk/jfx

    • @tabish__ali
      @tabish__ali 4 года назад

      @@GenuineCoder can you make a video, which includes how to export this project to standalone application / JAR. Which runs on windows. I have two client projects which i have done in Javafx8 / java 8.
      But now i want them to update on java 11 / javafx 14. I have tried to build jar of this application using documentation from intellj but in the end it says java 11 does not include deploy of fx projects.
      On documentation page it is also written that packaging javafx application is only possible with java 8 only.

    • @GenuineCoder
      @GenuineCoder  4 года назад

      @@tabish__ali
      You can build JAR with the help of Gradle.
      You can make use of "*distZip*" task in gradle to build a zip that contains everything to run the application (docs.gradle.org/current/userguide/distribution_plugin.html)
      I have added a sample of build.gradle that you can use with your JavaFX application. gist.github.com/afsalashyana/25b0d1774cd801f082d7d7cc2c66cbf7
      All your libraries will be added to a dedicated lib/ folder and will be available inside the zip.

    • @amralmaqtry6622
      @amralmaqtry6622 4 года назад

      this video about how to export javafx 11 or 13 to excuteable jar file
      ruclips.net/video/HGHu-SzL-5E/видео.html

  • @UthpalaBandaradoor
    @UthpalaBandaradoor 4 года назад

    azulu is good as oracal JDK?

    • @GenuineCoder
      @GenuineCoder  4 года назад

      It is in a way better than Oracle JDK.
      Zulu JDK is built from Open JDK. You can use it without any issues.

    • @UthpalaBandaradoor
      @UthpalaBandaradoor 4 года назад

      @@GenuineCoder thank u very much!

  • @typingcat
    @typingcat 4 года назад

    The only problem is that the Wyswyg designer for JavaFX SUCKSSSS compared to that of WPF in Visual Studio.