Skip to content Skip to sidebar Skip to footer

How To Connect Hsql (file Based) With My Android App?

Hello I have a problem connecting my android app to HSQLDB. First question: Is there a specific android jar for HSQLDB that i should use or could I use any HSQL jar? Second questio

Solution 1:

I have been able to establish a connection to an HSqlDB in Android 4.1.

Anyone who's looking to do this in Eclipse, make sure you have the hsqldb.jar in your libraries and make sure it's exported. All of this is in the Project > Java Build Path in Eclipse.

I'm able to make a connection and it has created a new set of database files. I'm using a file based db. Specifically I'm building a LibGDX game for Ouya, but it should work for any android project. The code that runs Hsql is in a completely different project from the Android project, so I needed to have it as a library for both, and to have it exported from the Android project.

Solution 2:

This is many years old but I think I found the problem. You need to make sure you have the hsqldb.jar that is compiled for the jdk appropriate for your target version of Android. In my case, I needed to download hsqldb-2.6.0-jdk6.jar. At the time I'm posting this, Android 11 (30) only supports up to jdk 8. The current "latest" release version (2.6) of hsqldb.jar is 11.

Post a Comment for "How To Connect Hsql (file Based) With My Android App?"