E
E
evgeni_menizky2017-06-27 11:04:14
Java
evgeni_menizky, 2017-06-27 11:04:14

How to create an executable jar for JavaFX with MySQL?

Good day.
The situation is this: there is a JavaFX application that contains several linked fxml windows with controllers for each, which also use the database.
You need to create an executable jar. Did it like this:

  1. File -> Project-> Structure -> Artifacts->JavaFX Application
  2. On the JavaFX tab, I select the main Login.java class for the Application class field.
  3. I collect, I receive a jar file.

After its launch, the Login.java start window opens, but after entering the authorization data (taken from the MySQL database), nothing happens, i.e. the following fxml windows do not open.
The jar contains all the project files.
A small remark: I tried to create fxml without binding to the database, it opened. As I understand it, the problem is somewhere in connection with the database.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Korobov, 2017-07-07
@superbadlam

fxml without database connection
What does it mean ?
As I understand it, the problem is somewhere in connection with the database.
If so, then check the classpath, does it have MySQL jars in it?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question