SQLite JDBC on VMS x86-64

Liste des GroupesRevenir à co vms 
Sujet : SQLite JDBC on VMS x86-64
De : arne (at) *nospam* vajhoej.dk (Arne Vajhøj)
Groupes : comp.os.vms
Date : 11. Jan 2025, 23:24:52
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vlur3k$puqm$1@dont-email.me>
User-Agent : Mozilla Thunderbird
This is a little HOWTO.
1) Get latest SQLite for VMS from https://sourceforge.net/projects/vms-ports/files/SQLITE3/
    (currently sqlite3_vms_051.zip)
2) Build with 64 bit pointers using MMS:
      $ mms/macro=(pointer_opt=64)
3) Get latest SQLite JDBC driver from https://github.com/xerial/sqlite-jdbc
    (currently sqlite-3.47.2.0.jar)
4) Get latest NativeDB.c from https://github.com/xerial/sqlite-jdbc/tree/master/src/main/java/org/sqlite/core
5) Generate JNI shareable image using COM file below.
$ jcc := cc/pointer=64/name=(as_is,shortened)/reent=multi/float=ieee/ieee=denorm/include=(sys$common:[openjdk$80.include],sys$common
:[openjdk$80.include.openvms],sqlite3_include)"
$ javah -cp sqlite-jdbc-3_47_2_0.jar org.sqlite.core.NativeDB
$ ren org_sqlite_core_NativeDB.h NativeDB.h
$ jcc NativeDB
$ pipe java$build_option NativeDB.obj > NativeDB.opt
$ link/map/share=sqlitejdbc NativeDB + NativeDB/opt + sys$input/opt
sqlite3shr64/share
$
$ exit
When running your JVM language application just put
the JDBC har in classpath and define java.library.path to
point to directory with sqlitejdbc.EXE.
Example:
$ javac Demo.java
$ java -cp .:sqlite-jdbc-3_47_2_0.jar -Djava.library.path=. Demo
Note that the Alpha and Itanium drivers at https://www.vms2linux.de/sqlitejdbc.html
are a little bit more advanced and extract the shareable image
from the jar file at runtime and load it similar to what it does
on Windows and Linux. Just having it on disk and specify
location in command line is good enough for me.
Arne

Date Sujet#  Auteur
11 Jan 25 * SQLite JDBC on VMS x86-647Arne Vajhøj
12 Jan 25 +* Re: SQLite JDBC on VMS x86-643Lawrence D'Oliveiro
12 Jan 25 i`* Re: SQLite JDBC on VMS x86-642Arne Vajhøj
12 Jan 25 i `- Re: SQLite JDBC on VMS x86-641Lawrence D'Oliveiro
12 Jan 25 `* Re: SQLite JDBC on VMS x86-643Arne Vajhøj
12 Jan 25  `* Re: SQLite JDBC on VMS x86-642Arne Vajhøj
13 Jan 25   `- Re: SQLite JDBC on VMS x86-641Arne Vajhøj

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal