Index: trunk/zoo-project/zoo-api/java/Makefile
===================================================================
--- trunk/zoo-project/zoo-api/java/Makefile	(revision 770)
+++ trunk/zoo-project/zoo-api/java/Makefile	(revision 771)
@@ -20,16 +20,16 @@
 all: libZOO.${ext}
 
-ZOO.class: ZOO.java
-	javac ZOO.java
+org/zoo_project/ZOO.class: org/zoo_project/ZOO.java
+	javac org/zoo_project/ZOO.java
 
-ZOO.h: ZOO.java ZOO.class
-	javah ZOO
+org_zoo_project_ZOO.h: org/zoo_project/ZOO.java org/zoo_project/ZOO.class
+	javah org.zoo_project.ZOO
 
-zoo-api.o: zoo-api.c ZOO.h
+zoo-api.o: zoo-api.c org_zoo_project_ZOO.h
 	gcc -fPIC -c zoo-api.c ${JAVACFLAGS} ${XML2CFLAGS} -I../../zoo-kernel/ -I../../../thirds/cgic206/
 
 libZOO.${ext}: zoo-api.o
-	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}
+	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
 
 clean:
-	rm -f *${ext} *o *.h *class
+	rm -f *${ext} *o *.h *class org/zoo_project/*.class
Index: trunk/zoo-project/zoo-api/java/ZOO.java
===================================================================
--- trunk/zoo-project/zoo-api/java/ZOO.java	(revision 770)
+++ 	(revision )
@@ -1,10 +1,0 @@
-import java.lang.*;
-import java.util.*;
-
-public class ZOO {
-    static { System.loadLibrary("ZOO"); }
-    public static Integer SERVICE_SUCCEEDED=3;
-    public static Integer SERVICE_FAILED=4;
-    public static native String _(String a);
-    public static native Integer updateStatus(HashMap conf,String pourcent,String message);
-}
Index: trunk/zoo-project/zoo-api/java/org/zoo_project/ZOO.java
===================================================================
--- trunk/zoo-project/zoo-api/java/org/zoo_project/ZOO.java	(revision 771)
+++ trunk/zoo-project/zoo-api/java/org/zoo_project/ZOO.java	(revision 771)
@@ -0,0 +1,12 @@
+package org.zoo_project;
+
+import java.lang.*;
+import java.util.*;
+
+public class ZOO {
+    static { System.loadLibrary("ZOO"); }
+    public static Integer SERVICE_SUCCEEDED=3;
+    public static Integer SERVICE_FAILED=4;
+    public static native String translate(String a);
+    public static native Integer updateStatus(HashMap conf,String pourcent,String message);
+}
Index: trunk/zoo-project/zoo-api/java/zoo-api.c
===================================================================
--- trunk/zoo-project/zoo-api/java/zoo-api.c	(revision 770)
+++ trunk/zoo-project/zoo-api/java/zoo-api.c	(revision 771)
@@ -1,8 +1,8 @@
-#include "ZOO.h"
+#include "org_zoo_project_ZOO.h"
 #include "service.h"
 #include "service_internal.h"
 #include "service_internal_java.h"
 
-JNIEXPORT jstring JNICALL Java_ZOO__1
+JNIEXPORT jstring JNICALL Java_org_zoo_1project_ZOO_translate
   (JNIEnv *env, jclass _class, jstring msg){
   const char *message = 
@@ -17,5 +17,5 @@
 }
 
-JNIEXPORT jobject JNICALL Java_ZOO_updateStatus
+JNIEXPORT jobject JNICALL Java_org_zoo_1project_ZOO_updateStatus
   (JNIEnv *env, jclass _class, jobject conf, jstring pourc, jstring msg){
 
Index: trunk/zoo-project/zoo-kernel/main_conf_read.l
===================================================================
--- trunk/zoo-project/zoo-kernel/main_conf_read.l	(revision 770)
+++ trunk/zoo-project/zoo-kernel/main_conf_read.l	(revision 771)
@@ -34,5 +34,5 @@
 %}
 
-attname	[a-zA-Z0-9_\-:]+
+attname	[a-zA-Z0-9_\-:.]+
 
 attvalue1	[%\*,;@a-zA-Z0-9_\-.:" "\"\'/\\\(\)\+\x41-\xff?&=]+
Index: trunk/zoo-project/zoo-kernel/service_internal_java.c
===================================================================
--- trunk/zoo-project/zoo-kernel/service_internal_java.c	(revision 770)
+++ trunk/zoo-project/zoo-kernel/service_internal_java.c	(revision 771)
@@ -92,22 +92,26 @@
 #endif
 #ifndef WIN32
-  int nb=3+njdb;
-#endif
+  int nb=2+njdb;
+#endif
+  int nbs[3]={0,0,0};
+  maps* javaMap=getMaps(*main_conf,"java");
+  if(javaMap!=NULL){
+    nbs[0]+=count(javaMap->content);
+  }
+  int nbc1=0;
+  maps* javaXMap=getMaps(*main_conf,"javax");
+  if(javaXMap!=NULL){
+    nbs[1]+=count(javaXMap->content);
+  }
   int nbc0=0;
   maps* javaXXMap=getMaps(*main_conf,"javaxx");
   if(javaXXMap!=NULL){
-    nbc0+=count(javaXXMap->content);
-  }
-  int nbc1=0;
-  maps* javaXMap=getMaps(*main_conf,"javax");
-  if(javaXMap!=NULL){
-    nbc1+=count(javaXMap->content);
+    nbs[2]+=count(javaXXMap->content);
   }
 #ifdef WIN32
-  //#define nb (2+nbc0+nbc1)
-  const int nb=2+nbc0+nbc1;
+  const int nb=2+nbs[1]+nbs[2]+nbs[0];
   JavaVMOption *options=(JavaVMOption*)malloc(nb*sizeof(JavaVMOption));
 #else
-  JavaVMOption options[nb+nbc0+nbc1+1];
+  JavaVMOption options[nb+nbs[1]+nbs[2]+nbs[0]+1];
 #endif
   JavaVMInitArgs vm_args;
@@ -123,24 +127,13 @@
 #endif
   int i,start;
-  map *cursorxx=NULL;
-  if(javaXXMap!=NULL)
-    cursorxx=javaXXMap->content;
-  map *cursorx=NULL;
-  if(javaXMap!=NULL)
-    cursorx=javaXMap->content;
   options[0].optionString = oclasspath;
   options[0].extraInfo=NULL;
   options[1].optionString = "-server";
   options[1].extraInfo=NULL;
-  char tmp1[100];
-  sprintf(tmp1,"-Djava.library.path=%s",cwdMap->value);
-  fprintf(stderr,"%s\n",tmp1);
-  options[2].optionString = tmp1;
+#ifdef USE_JDB
+  options[2].optionString = "-Xdebug";
   options[2].extraInfo=NULL;
-#ifdef USE_JDB
-  options[3].optionString = "-Xdebug";
+  options[3].optionString = "-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=7896";
   options[3].extraInfo=NULL;
-  options[4].optionString = "-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=7896";
-  options[4].extraInfo=NULL;
 #endif
 #ifdef WIN32
@@ -148,19 +141,33 @@
   options[1].optionString = "-Xmx512m";
 #else
-  start=3+njdb;
-#endif
-  for(i=0;i<nbc0;i++){
-    char *tmp=parseJVMXXOption(cursorxx);
+  start=2+njdb;
+#endif
+  map *cursors[3]={NULL,NULL,NULL};
+  if(javaMap!=NULL)
+    cursors[0]=javaMap->content;
+  if(javaXMap!=NULL)
+    cursors[1]=javaXMap->content;
+  if(javaXXMap!=NULL)
+    cursors[2]=javaXXMap->content;
+  for(i=0;i<nbs[0];i++){
+    char *tmp=parseJVMOption(cursors[0]);
     options[start+i].optionString = zStrdup(tmp);
     options[start+i].extraInfo=NULL;
     free(tmp);
-    cursorxx=cursorxx->next;
-  }
-  for(;i<nbc1+nbc0;i++){
-    char *tmp=parseJVMXOption(cursorx);
+    cursors[0]=cursors[0]->next;
+  }
+  for(;i<nbs[0]+nbs[1];i++){
+    char *tmp=parseJVMXOption(cursors[1]);
     options[start+i].optionString = zStrdup(tmp);
     options[start+i].extraInfo=NULL;
     free(tmp);
-    cursorx=cursorx->next;
+    cursors[1]=cursors[1]->next;
+  }
+  for(;i<nbs[0]+nbs[2]+nbs[1];i++){
+    char *tmp=parseJVMXXOption(cursors[2]);
+    options[start+i].optionString = zStrdup(tmp);
+    options[start+i].extraInfo=NULL;
+    free(tmp);
+    cursors[2]=cursors[2]->next;
   }
 
@@ -168,5 +175,5 @@
   vm_args.version = JNI_VERSION_1_6;
   vm_args.options = options;
-  vm_args.nOptions = start+nbc0+nbc1;
+  vm_args.nOptions = start+nbs[0]+nbs[1]+nbs[2];
   vm_args.ignoreUnrecognized = JNI_TRUE;
 
@@ -209,5 +216,5 @@
   if (cls != NULL) {
 #ifdef JAVA7
-    (*env).ExceptionClear();
+@    (*env).ExceptionClear();
     pmid=(*env).GetStaticMethodID(cls, s->name, "(Ljava/util/HashMap;Ljava/util/HashMap;Ljava/util/HashMap;)I");
 #else
@@ -281,5 +288,5 @@
   (*jvm)->DestroyJavaVM(jvm);
 #endif
-  for(i=0;i<nbc1+nbc0;i++){
+  for(i=0;i<nbs[2]+nbs[1]+nbs[0];i++){
     free(options[start+i].optionString);
   }
@@ -334,4 +341,17 @@
 
 /**
+ * Create a string containing the JVM -D* options for a given map
+ * The result will be : -Dname=value
+ *
+ * @param m the map containing the option
+ * @return a char* containing the valide JVM option (-D*)
+ */
+char *parseJVMOption(map* m){
+  char *res=(char*)malloc((strlen(m->name)+strlen(m->value)+4)*sizeof(char));
+  sprintf(res,"-D%s=%s",m->name,m->value);
+  return res;
+}
+
+/**
  * Create a string containing the JVM -XX:* option for a given map
  * Depending on the map' name:
@@ -458,5 +478,5 @@
 	    
 	    for(i=0;i<alen1;i++){
-	      map* vMap=getMapArray(tmp->content,"value",i);	    
+	      map* vMap=getMapArray(tmp->content,"value",i);
 	      map* sMap=getMapArray(tmp->content,"size",i);
 	      map* mMap=getMapArray(tmp->content,tmap->value,i);
Index: trunk/zoo-project/zoo-kernel/service_internal_java.h
===================================================================
--- trunk/zoo-project/zoo-kernel/service_internal_java.h	(revision 770)
+++ trunk/zoo-project/zoo-kernel/service_internal_java.h	(revision 771)
@@ -45,4 +45,6 @@
   char *parseJVMXOption(map*);
 
+  char *parseJVMOption(map*);
+
   int zoo_java_support(maps**,map*,service*,maps**,maps**);
 
Index: trunk/zoo-project/zoo-services/hello-java/HelloJava.java
===================================================================
--- trunk/zoo-project/zoo-services/hello-java/HelloJava.java	(revision 770)
+++ trunk/zoo-project/zoo-services/hello-java/HelloJava.java	(revision 771)
@@ -25,4 +25,5 @@
 import java.lang.*;
 import java.util.*;
+import org.zoo_project.*;
 
 public class HelloJava {
@@ -31,5 +32,5 @@
         String v=tmp.get("value").toString();
         HashMap hm1 = (HashMap)(outputs.get("Result"));
-        hm1.put("value",ZOO._("Hello "+v+" from JAVA World !!"));
+        hm1.put("value",ZOO.translate("Hello "+v+" from JAVA World !!"));
         return ZOO.SERVICE_SUCCEEDED;
     }
@@ -47,5 +48,5 @@
 	}
         HashMap hm1 = (HashMap)(outputs.get("Result"));
-        hm1.put("value",ZOO._("Hello "+v+" from JAVA World !!"));
+        hm1.put("value",ZOO.translate("Hello "+v+" from JAVA World !!"));
         return ZOO.SERVICE_SUCCEEDED;
     }
