I am creating a JavaFX program with an embedded H2 database that will be used to handle user logins and passwords. Using Intellij Ultimate, I have a database that I can run
You really should provide a complete stack trace and not just the error message in such questions.
And message that you see is not a compilation error.
Usually such message means that your database is corrupted. If you don't need any data from it, you can simply delete all its files and re-create it from the scratch.
If you can open the database from some tool, but cannot open it from your application, check the versions of H2 that are used in both places and align them. You can export the database in version that works to an SQL script with SCRIPT TO 'filename.sql' command and use that script to populate the data into new database to make sure that it isn't damaged (with the version that you prefer).