Jump to content
Excelsior Forums


  • Content count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About powerdroid

  • Rank
  • Birthday 01/01/1
  1. powerdroid

    A couple questions about Invocation

    Thank you Kit. So, can I use a jni.h file from any version of Oracle's jdk? (does it matter which is used?)
  2. powerdroid

    A couple questions about Invocation

    In the Invocation sample "cMain" in the file "test.c", jni.h is included. Is this file from Oracle's jdk? If so, is there a specific version of the jdk that should be used? Also, there is a section listed below: /* * NOTE: no JVM is actually created * this call to JNI_CreateJavaVM is intended for JET RT initialization */ result = JNI_CreateJavaVM_func (pjvm, (void **)penv, &args); if (result != JNI_OK) { printf ("JNI_CreateJavaVM() failed with result %d\n", result); exit(1); } What is the flow of what is happening here? Meaning, it appears that the dll is being loaded at "myDllHandle = loadDll (dllname);" prior to the "initJavaRT" being called. What happens when the dll is loaded, if the Jet runtime hasn't been loaded yet? Also, when this is running, how does the system/code know where the Jet RT files reside (are they expecting them to be in "rt" folder that is packaged with the dll? Thank you for any help you could give to help me understand the flow of this..
  3. powerdroid

    JNI Invocation API, accessing dll

    I've successfully compiled several jars, and thus packages, into a single dll. I have an application that will now access the classes from these jars, now packaged as a dll, via JNI after invoking a new JVM. I'm wondering how to get the whole thing working correctly. Do I need to tell xjvm where to find the dll somehow and will it automatically find the necessary packages inside the dll or is there a specific technique I should use to get access to the classes inside the packages that are compiled into the dll? PD