JDBC and *.so files

Hey there!

I’m currently trying to implement sqlite database management with the current moe.
My plan is to use sqldroid for the jdbc connection for android and use xerial jdbc for database connections on ios.

At the moment I got it working to the point that the moe-jvm wants me to add the libsqlitejdbc.so somehow.
But I don’t know how to do that.

The only message in the stacktrace I’m seeing is:

java.lang.UnsatisfiedLinkError: Library sqlitejdbc not found; tried [/libsqlitejdbc.so]

Does anyone know how to solve this issue?

thanks!

Try use sqldroid for ios too. MOE should provides enough android APIs for it to work.

1 Like

Wow, I tried it and it directly worked!
I’m happy!

Can you explain why it worked? I thought moe did not provide any android api or have I missed something?

Thanks for your quick reply already!

:laughing: MOE is basically an android runtime on top of ios. It implements the android ART virtual machine as well as most of the java & android framework libs (except ui part and some platform related codes) including the android sqlite api. Since sqldroid is a pure java implementation based on that so it could work.

1 Like

Oh well, it seems that I had a wrong conception about it :sweat_smile:. Is there a list out there where I could look up class which can be reused from the Android runtime?

If you are using android studio or intellij, on the left side of your workspace, you could find something called “external libraries”:

image
(I found this image from internet, yours should look different).

In this section, you could find a library called moe-core (or something similar, I’m not 100% sure since I’m not in the office to check those names but I believe you could get it :slight_smile:), expand it and you will see all class in this library. Another library called moe-ios (or similar) where you can find all classes and APIs for ios bindings.

1 Like