I want to create a java application that I can compile and ship to some friends to use. To store and manage data I need an integrated database so that when my friends and I run the application we can use it to add and work with data that persists between runs. But I also don't want to set up a cloud database/application to connect to, because this would then require a server setup and cost etc.
Now, my problem is, I downloaded the java jdk-21 (https://www.oracle.com/de/java/technologies/downloads/) and the db-derby-10.17.1.0-bin.zip (https://db.apache.org/derby/releases/release-10_17_1_0.cgi). I extracted the content of the derby database into a db folder inside the jdk-21 as it was shown in a tutorial (See this screenshot). But I also tried to put it into another folder like a C:\DerbyDB. Which made no difference to the problems I'm facing.
I also added the DERBY_HOME systemvariable path to the db folder and the JAVA_HOME path to the jdk-21 folder.
Then I opened my java application in IntelliJ Ultimate IDE and opened the Data Sources and Drivers window. I tried to set up the driver and here the first problem occured. Intellij only allowed me to configure the vers. 10.16.1.1 driver, not the vers. 10.17.1.1 one. Screenshot of Drivers window Then I tried to set up the conncection with the path to the db a username, connection type default and embedded driver. When I hit "Test Connection" I got two different errors depending on wheather the checkbox "Create Database" is checked or unchecked.
When checked I get a "database already exists" error: Screenshot of error log
When unchecked I get a "database not found" error: Screenshot of error log
Also: the loading circle next to "test connection" never finishes. I don't get a success or failed message from the IDE. The connection test continues to be in progress endlessly.