Here is the code ready to use and written in C, to create a JDK
1.1 Java Virtual Machine.
data.version = 0x00010001; /*select version of your jvm, jdk1.1*/
printf("Error when creating the JVM...");
Here we locate our class and our initialization method ...*/
MyClass = (*env)->FindClass(env,"MyDesiredClass");
printf("Exiting Virtual Machine ...");
}/*end of else*/
}/*end of code*/
This code creates a VM ready to load a class and execute one of its
static methods; &jvm is a pointer to the JVM. We have also the
choice of using the function:
This allows me to see which VMs are created and select one on the pointers array JavaVM**, although in JDK1.1 no more than one VM is allowed, this would allow me to see if there's a VM created and use it.