Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8056295
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T08:39:42+00:00 2026-06-05T08:39:42+00:00

The third argument of the method JNI_CreateJavaVM takes the third argument as JavaVMInitArgs structure.

  • 0

The third argument of the method JNI_CreateJavaVM takes the third argument as JavaVMInitArgs structure.

typedef struct JavaVMInitArgs { 
                     jint version; 
                     jint nOptions; 
                     JavaVMOption *options; 
                     jboolean ignoreUnrecognized; 
                 } JavaVMInitArgs;

How do i initialize this ? I am unable to do so.

Prototype of JNI_CreateJavaVM: jint JNI_CreateJavaVM(JavaVM **pvm, void **penv,
void *vm_args);

How do i initialize vm_args ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T08:39:44+00:00Added an answer on June 5, 2026 at 8:39 am

    After some discussion we came to the conclution that you had problems with your compiler setup.

    To be able to successfully compile and link JNI_CreateJavaVM you need to add the jvm library to your linker.


    Initial answer:

    Looking at The Invocation API the following example might explain what you need to do:

    JavaVMInitArgs vm_args;
    JavaVMOption options[4];
    
    options[0].optionString = "-Djava.compiler=NONE";           /* disable JIT */
    options[1].optionString = "-Djava.class.path=c:\myclasses"; /* user classes */
    options[2].optionString = "-Djava.library.path=c:\mylibs";  /* set native library path */
    options[3].optionString = "-verbose:jni";                   /* print JNI-related messages */
    
    vm_args.version = JNI_VERSION_1_2;
    vm_args.options = options;
    vm_args.nOptions = 4;
    vm_args.ignoreUnrecognized = TRUE;
    
    /* Note that in the JDK, there is no longer any need to call 
     * JNI_GetDefaultJavaVMInitArgs. 
     */
    res = JNI_CreateJavaVM(&vm, (void **)&env, &vm_args);
    if (res < 0) ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The method Object.defineProperty (see here ) accepts as third argument a descriptor. What is
My method for downloading file. It's a bit simplified, I removed the third argument
I'm working with a method that takes a block as an argument. I'm new
THIRD EDIT: I now believe that this problem is due to a SOAP version
I have a method that given a delegate Type argument (not a generic), it
Third try at fixing this tonight - trying a different approach than before now.
I want to use third party js in my html5 cache manifest. I don't
Is it possible for third party apps to show big icons and interactive content
I have a third party JQuery library that does this: var $this = $(this);
I will work with third party API. They accept a date pattern like: 2012-02-15T17:34:37.937-0600

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.