Warning: Use of undefined constant fixed - assumed 'fixed' (this will throw an Error in a future version of PHP) in /home/webtro13/domains/farenda.com/public_html/wp-content/themes/moments/header.php on line 65

Java Programming Tutorials

Java programming tutorials with many code examples!

HSQLDB Database Manager


How to start HSQLDB Database Manager?


The Database Manager is part of HSQLDB and is contained in its JAR. So, if you use the DB in your project and downloaded JARs using Maven, then you can use the following script to automatically start the newest Database Manager:

HSQLDB_CLASSPATH=$(find ~/.m2/repository/ -name '*hsqldb-*[0-9].jar' -type f | sort -r | head -1)
if [ -z "${HSQLDB_CLASSPATH}" ]; then
    echo "Can't find HSQLDB jar in ~/.m2/repository."
    java -cp "${HSQLDB_CLASSPATH}" org.hsqldb.util.DatabaseManagerSwing

The script is searching ~/.m2/repository for all HSQLDB JARs and selects the one with the highest number, so the newest one.

Share with the World!