Displaying 1 result from an estimated 1 matches for "optionstr".
Did you mean:
optionst
2009 Apr 05
1
RJava question(class not found with rJava's vm, though found with alternate vm)
...rJava?
==code==
void create_vm(const char *clap) {
char* classpath = (char*) calloc(18+strlen(clap)+1, sizeof(char));
sprintf(classpath,"-Djava.class.path=%s",clap);
JavaVMInitArgs args;
JavaVMOption options[2];
args.version = JNI_VERSION_1_4;
args.nOptions = 2;
options[0].optionString = classpath;
options[1].optionString = "-Xrs";
args.options = options;
args.ignoreUnrecognized = JNI_TRUE;
JavaVM *jvms[32];
jsize vms=0;
int r=0;
r=JNI_GetCreatedJavaVMs(jvms, 32, &vms);
if (r) {
error("JNI_GetCreatedJavaVMs returned %d\n", r);
} el...