Changeset 355
- Timestamp:
- Mar 2, 2012, 12:55:11 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-project/zoo-kernel/service_internal_java.c
r354 r355 32 32 getcwd(ntmp,1024); 33 33 map* tmp=getMap(request,"metapath"); 34 char classpath[2048];35 char oclasspath[2068];34 char *classpath; 35 char *oclasspath; 36 36 int res=SERVICE_FAILED; 37 37 char *cclasspath=getenv("CLASSPATH"); 38 38 if(tmp!=NULL){ 39 if(cclasspath!=NULL) 39 if(cclasspath!=NULL){ 40 classpath=(char*) malloc((strlen(ntmp)+strlen(tmp->value)+strlen(cclasspath)+4)*sizeof(char)); 41 oclasspath=(char*) malloc((strlen(ntmp)+strlen(tmp->value)+strlen(cclasspath)+22)*sizeof(char)); 40 42 sprintf(classpath,"%s/%s/:%s",ntmp,tmp->value,cclasspath); 41 else 43 } 44 else{ 45 classpath=(char*) malloc((strlen(ntmp)+strlen(tmp->value)+3)*sizeof(char)); 46 oclasspath=(char*) malloc((strlen(ntmp)+strlen(tmp->value)+21)*sizeof(char)); 42 47 sprintf(classpath,"%s/%s/",ntmp,tmp->value); 43 sprintf(oclasspath,"-Djava.class.path=%s",classpath); 44 } 45 else{ 46 if(cclasspath!=NULL) 47 sprintf(classpath,"%s:%s",ntmp,cclasspath); 48 else 49 sprintf(classpath,"%s",ntmp); 48 } 50 49 sprintf(oclasspath,"-Djava.class.path=%s",classpath); 51 50 } … … 54 53 fprintf(stderr,"(%s)\n",oclasspath); 55 54 #endif 56 setenv("CLASSPATH",classpath,1);57 55 58 56 JavaVMOption options[1];
Note: See TracChangeset
for help on using the changeset viewer.