How To Deploy a JavaFX 19 JAR with a MySQL using JDBC in IntelliJ 2022.3.2 on Windows 11 x64

Поділитися
Вставка
  • Опубліковано 11 вер 2024
  • This tutorial video demonstrates how to connect to a MySQL database using JDBC in a JavaFX application, and how to deploy the application as an executable JAR file in IntelliJ 2022.3.2 on Windows 11 x64.
    MySQL Connector/J (JDBC) installation directory
    C:\Program Files\Java\mysql-connector-j-8.0.32
    Java installation directory.
    C:\Program Files\Java\jdk-19
    JavaFX installation directory.
    C:\Program Files\Java\javafx-sdk-19.0.2.1
    Setting Environment Variables
    JAVA_HOME="C:\Program Files\Java\jdk-19"
    JAVA_HOME tells your OS where there Java installation directory lives.
    PATH="%JAVA_HOME%\bin"
    PATH specifies where the Java executable directory resides.
    If you are not sure how to set up environment variables, you can refer to • How To Install JDK 15.... ​
    VM options
    --module-path "C:\Program Files\Java\javafx-sdk-19.0.2.1\lib"
    --add-modules javafx.controls,javafx.fxml
    Leaving a space between the two module names, like this: --add-modules=javafx.controls, javafx.fxml, may result in a syntax error. Therefore, it is important to ensure that there is no space between the module names when using the --add-modules option with JavaFX.
    JDK 19.0.2
    MySQL JDB
    JavaFX SceneBuilder 19.0.2.1
    IntelliJ IDEA 2022.3.2
    Windows 11 Pro x64
    #JavaFX​​19 #ExecutableJar​​ #DeployJar​ #CreateJar #JDBC

КОМЕНТАРІ • 4

  • @abial109
    @abial109 7 місяців тому +1

    Can you explain in detail what are necessities to deploy SQL database with javafx project?

  • @vatsalshah8896
    @vatsalshah8896 Рік тому

    How do you create exe, or msi of projuct using mysql. I keep failing at that. have been trying to do it for months

  • @libanbande4640
    @libanbande4640 Рік тому

    I followed those steps and it is true that the JAR is executed, but there is an error involved that is thrown when the JAR is executed through the console.
    WARNING: Unsupported JavaFX configuration: classes were loaded from 'unnamed module @6f8e8d9c'
    java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver
    How to solve the problem with JDBC?