I made JavaFX application in Intelij Idea. I have database file in resource folder with all the stuff like video and icons. I tried to use Maven to build a project but it was unsuccessfully.
I added dependencies of my libraries that I use in the project to pom file.
I would like to have a folder with all necessary files like video and icons and also database file that can be changed at any time by user.
I would like to have an exe file in that folder just to make easier to run my program in any other windows machine.
I know there is laucnh4j application, but I even can't build jar file with all libraries and database file.
How can I build jar or exe file in Intelij Idea?
Where should the database file be placed?
My project structure:
Pom file:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>kentforth</groupId>
<artifactId>CategoryCards</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<properties>
<maven.compiler.source>10</maven.compiler.source>
<maven.compiler.target>10</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.controlsfx</groupId>
<artifactId>controlsfx</artifactId>
<version>9.0.0</version>
</dependency>
<dependency>
<groupId>com.jfoenix</groupId>
<artifactId>jfoenix</artifactId>
<version>9.0.6</version>
</dependency>
<dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>3.23.1</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>11</version>
</dependency>
</dependencies>
EDIT:
I've decided not to use Maven for making a build because It is hard for me to understand how to build a jar file or exe file with database. I used standard Intelij Idea's method to make jar, I built a jar file with libraries and database file, I made exe file with laucnh4j app and packed that exe file to installator with Innmo setup
When I launch the application in another computer database works fine and I can write/read database. But the problem is I can't find that database file in OS Windows
I think it is because database fle is packed to jar file.
Is there any solution how to make my application read database file from folder with jar file, not from direct jar?
My friend will use this database file to read/write information to database