int main(int argc, char* argv[]) { options.mainClass = (char*) _bcMainClass; options.rawBootclasspath = _bcBootclasspath; options.rawClasspath = _bcClasspath; options.loadBootClass = loadBootClass; options.loadUserClass = loadUserClass; options.classInitialized = classInitialized; options.loadInterfaces = loadInterfaces; options.loadFields = loadFields; options.loadMethods = loadMethods; options.findClassAt = findClassAt; options.exceptionMatch = exceptionMatch; options.dynamicJNI = _bcDynamicJNI; options.staticLibs = _bcStaticLibs; options.runtimeData = &_bcRuntimeData; options.listBootClasses = listBootClasses; options.listUserClasses = listUserClasses; if (!rvmInitOptions(argc, argv, &options, FALSE)) { fprintf(stderr, "rvmInitOptions(...) failed!\n"); return 1; } Env* env = rvmStartup(&options); if (!env) { fprintf(stderr, "rvmStartup(...) failed!\n"); return 1; } vm = env->vm; jint result = rvmRun(env) ? 0 : 1; rvmShutdown(env, result); return result; }
static int bcmain(int argc, char* argv[]) { initOptions(); if (!rvmInitOptions(argc, argv, &options, FALSE)) { fprintf(stderr, "rvmInitOptions(...) failed!\n"); return 1; } Env* env = rvmStartup(&options); if (!env) { fprintf(stderr, "rvmStartup(...) failed!\n"); return 1; } vm = env->vm; jint result = rvmRun(env) ? 0 : 1; rvmShutdown(env, result); return result; }