Kompilacja do .class
gcj -g -C UtlDir.java
----------------
Kompilacja do .so
gcj -fPIC -shared -o UtlDir.so UtlDir.java
Plik Manifest.txt
Main-Class: UtlDir
Pakowanie do JAR
jar cfm UtlDir.jar Manifest.txt UtlDir.class
----------------
SELECT sqlj.install_jar('file:///local/css-utf8/baza/pljava/UtlDir.jar', 'utldir_jar', true);
SELECT sqlj.set_classpath('hurt_stp', 'utldir_jar');
SELECT sqlj.set_classpath('smok', 'utldir_jar');
SELECT sqlj.set_classpath('mb', 'utldir_jar');
----
ALBo
SELECT * FROM "sqlj"."replace_jar"('file:///local/css-utf8/baza/pljava/UtlDir.jar','utldir_jar',false);
-------------------
CREATE OR REPLACE FUNCTION hurt_stp.iswindows_ (
)
RETURNS integer AS
$body$
UtlDir.IsWindows
$body$
LANGUAGE 'java'
VOLATILE
CALLED ON NULL INPUT
SECURITY INVOKER
COST 100;
---------
SELECT * FROM hurt_stp.iswindows_();
Brak komentarzy:
Prześlij komentarz