Ignore:
Timestamp:
Jun 10, 2016, 1:40:44 AM (8 years ago)
Author:
djay
Message:

Remove the default java.library.path definition and use an optional [java] section instead (where the key java.library.path, amongst other, may be defined). Change _ function name to translate in the Java ZOO-API. Use a ogr.zoo_project package containing the ZOO class. Fix the hello-java service and update doc consequently

Location:
trunk/zoo-project/zoo-api/java
Files:
2 added
2 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/zoo-project/zoo-api/java/Makefile

    r612 r771  
    2020all: libZOO.${ext}
    2121
    22 ZOO.class: ZOO.java
    23         javac ZOO.java
     22org/zoo_project/ZOO.class: org/zoo_project/ZOO.java
     23        javac org/zoo_project/ZOO.java
    2424
    25 ZOO.h: ZOO.java ZOO.class
    26         javah ZOO
     25org_zoo_project_ZOO.h: org/zoo_project/ZOO.java org/zoo_project/ZOO.class
     26        javah org.zoo_project.ZOO
    2727
    28 zoo-api.o: zoo-api.c ZOO.h
     28zoo-api.o: zoo-api.c org_zoo_project_ZOO.h
    2929        gcc -fPIC -c zoo-api.c ${JAVACFLAGS} ${XML2CFLAGS} -I../../zoo-kernel/ -I../../../thirds/cgic206/
    3030
    3131libZOO.${ext}: zoo-api.o
    32         gcc zoo-api.o -shared -o libZOO.${ext} -Wl,../../zoo-kernel/service_internal.o,${JAVA_FILES},${MS_FILES}${JS_FILES}../../zoo-kernel/ulinet.o ${GDAL_LIBS} ${XML2LDFLAGS} ${PYTHONLDFLAGS} ${PERLLDFLAGS}  ${PHPLDFLAGS} ${JAVALDFLAGS} ${JSLDFLAGS} -lcrypto ${MS_LDFLAGS} ${MACOS_LD_FLAGS} -lcurl -lfcgi ${MACOS_LD_NET_FLAGS}
     32        gcc zoo-api.o -shared -o libZOO.${ext} -Wl,../../zoo-kernel//service_yaml.o,../../zoo-kernel/lex.cr.o,../../zoo-kernel/main_conf_read.tab.o,../../zoo-kernel/lex.sr.o,../../zoo-kernel/service_conf.tab.o,../../zoo-kernel/service_internal.o,../../zoo-kernel/server_internal.o,../../zoo-kernel/response_print.o,${JAVA_FILES},${MS_FILES}${JS_FILES}../../zoo-kernel/ulinet.o ${GDAL_LIBS} ${XML2LDFLAGS} ${PYTHONLDFLAGS} ${PERLLDFLAGS}  ${PHPLDFLAGS} ${JAVALDFLAGS} ${JSLDFLAGS} -lcrypto ${MS_LDFLAGS} ${MACOS_LD_FLAGS} -lcurl -lfcgi ${MACOS_LD_NET_FLAGS} -lzoo_service -lyaml
    3333
    3434clean:
    35         rm -f *${ext} *o *.h *class
     35        rm -f *${ext} *o *.h *class org/zoo_project/*.class
  • trunk/zoo-project/zoo-api/java/org/zoo_project/ZOO.java

    r766 r771  
     1package org.zoo_project;
     2
    13import java.lang.*;
    24import java.util.*;
     
    68    public static Integer SERVICE_SUCCEEDED=3;
    79    public static Integer SERVICE_FAILED=4;
    8     public static native String _(String a);
     10    public static native String translate(String a);
    911    public static native Integer updateStatus(HashMap conf,String pourcent,String message);
    1012}
  • trunk/zoo-project/zoo-api/java/zoo-api.c

    r766 r771  
    1 #include "ZOO.h"
     1#include "org_zoo_project_ZOO.h"
    22#include "service.h"
    33#include "service_internal.h"
    44#include "service_internal_java.h"
    55
    6 JNIEXPORT jstring JNICALL Java_ZOO__1
     6JNIEXPORT jstring JNICALL Java_org_zoo_1project_ZOO_translate
    77  (JNIEnv *env, jclass _class, jstring msg){
    88  const char *message =
     
    1717}
    1818
    19 JNIEXPORT jobject JNICALL Java_ZOO_updateStatus
     19JNIEXPORT jobject JNICALL Java_org_zoo_1project_ZOO_updateStatus
    2020  (JNIEnv *env, jclass _class, jobject conf, jstring pourc, jstring msg){
    2121
Note: See TracChangeset for help on using the changeset viewer.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png