0

Does anyone know how to launch equinox through jni ? I was able to invoke jvm using JNI_CreateJavaVM(&jvm, (void**)&env, &vm_args); I got the main class of org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar . Now how to pass the launcher arguments to equinox launcher ? I was trying to do this way ... To which method should i pass the arguments ? i was trying to do it for the run .. . I am getting a return code 13 and its not launching ... what could be the issue ?

if(mainObject != NULL) {
                runMethod =  env->GetMethodID( mainClass, "run", "([Ljava/lang/String;)I");
                if(runMethod != NULL) {
                    methodArgs =  createRunArgs(env, equinoxArg2s);
                    if(methodArgs != NULL) {
                        //results->launchResult = 0;
                         runresult = env->CallIntMethod(mainObject, runMethod, methodArgs);
                        env->DeleteLocalRef(methodArgs);
Dav
  • 58
  • 1
  • 7

1 Answers1

0

I am doing everything correctly except the character array conversion . WCHAR to jobjectarray that i created was passing some junk chars , hence the issue ... So lesson learnt : beware of data that you are passing over jni . Do a double check on eithersides if you can ..

Dav
  • 58
  • 1
  • 7