Ejemplo n.º 1
0
        private static JNetVirtualMachine Boot(IJNetBootstrap bootstrap, JavaVM *vm, JNIEnv *env)
        {
            var instance = new JNetVirtualMachine(vm);

            if (bootstrap is not null)
            {
                var runtime = new JNetRuntime(env);

                try
                {
                    bootstrap.Startup(instance, runtime);
                }
                catch
                {
                    instance.Destroy();
                    throw;
                }
            }

            return(instance);
        }
Ejemplo n.º 2
0
		static JavaVM()
		{
			JNI.jvmCreated = true;
			pJavaVM = (JavaVM*)(void*)JniMem.Alloc(IntPtr.Size * (1 + vtableDelegates.Length));
			pJavaVM->vtable = &pJavaVM->firstVtableEntry;
			for(int i = 0; i < vtableDelegates.Length; i++)
			{
				pJavaVM->vtable[i] = JniHelper.ikvm_MarshalDelegate(vtableDelegates[i]);
			}
		}
Ejemplo n.º 3
0
 internal static extern JNI.Result JNI_GetCreatedJavaVMs(out JavaVM *jvm, int bufferLength, out int createdVMs);
Ejemplo n.º 4
0
 private JNetVirtualMachine(JavaVM *vm)
 {
     this.vm = vm;
 }
Ejemplo n.º 5
0
 internal static extern JNI.Result JNI_CreateJavaVM(out JavaVM *jvm, out JNIEnv *env, JavaVMInitArgs *args);