Changeset 352
- Timestamp:
- Mar 1, 2012, 11:37:37 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-project/zoo-kernel/service_internal_java.c
r348 r352 35 35 char oclasspath[2068]; 36 36 int res=SERVICE_FAILED; 37 char *cclasspath=getenv("CLASSPATH"); 37 38 if(tmp!=NULL){ 38 sprintf(classpath,"%s/%s/:$CLASSPATH",ntmp,tmp->value); 39 sprintf(oclasspath,"-Djava.class.path=%s/%s",ntmp,tmp->value); 39 if(cclasspath!=NULL) 40 sprintf(classpath,"%s/%s/:%s",ntmp,tmp->value,cclasspath); 41 else 42 sprintf(classpath,"%s/%s/",ntmp,tmp->value); 43 sprintf(oclasspath,"-Djava.class.path=%s",classpath); 40 44 } 41 45 else{ 42 sprintf(classpath,"%s:$CLASSPATH",ntmp); 43 sprintf(oclasspath,"-Djava.class.path=%s",ntmp); 46 if(cclasspath!=NULL) 47 sprintf(classpath,"%s:%s",ntmp,cclasspath); 48 else 49 sprintf(classpath,"%s/%s/",ntmp,tmp->value); 50 sprintf(oclasspath,"-Djava.class.path=%s",classpath); 44 51 } 45 52 #ifdef DEBUG … … 59 66 int i; 60 67 61 options[0].optionString = oclasspath; 62 63 vm_args.version = JNI_VERSION_1_2; 68 options[0].optionString = strdup(oclasspath); 69 64 70 JNI_GetDefaultJavaVMInitArgs(&vm_args); 71 vm_args.version = JNI_VERSION_1_6; 65 72 vm_args.options = options; 66 73 vm_args.nOptions = 1; … … 89 96 free(err); 90 97 (*jvm)->DestroyJavaVM(jvm); 91 return 1;98 return -1; 92 99 } 93 100 #ifdef DEBUG
Note: See TracChangeset
for help on using the changeset viewer.