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

  • Home
  • SEARCH
  • 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 7564125
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T13:50:16+00:00 2026-05-30T13:50:16+00:00

I’m diving into Java’s OpenJDK’s source code and I was in hopes of learning

  • 0

I’m diving into Java’s OpenJDK’s source code and I was in hopes of learning a bit about CallStaticVoidMethod. But I’m having a hardtime doing so.

This is where I got stomped:

00535     void (JNICALL *CallStaticVoidMethod)
00536       (JNIEnv *env, jclass cls, jmethodID methodID, ...);

If my rough C knowledge is right, this seems like a function call(to where?). Maybe it could be that’s making a call to some alread compiled library?

(JNICALL is just a calling convention)
being that JNICALL seems to be __stdcall ( What is __stdcall? )

Here is the file’s full source code:
http://xdprof.sourceforge.net/doxygen/jni_8h-source.html

Thanks

  • 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-05-30T13:50:17+00:00Added an answer on May 30, 2026 at 1:50 pm

    Maybe it could be that's making a call to some alread compiled library?

    Yeah – I think you need some background on what the JNI is. Let me try and provide that background quickly, as I think it will clear up your confusion, or at least set you on the right track.

    Java runtimes can’t run on Java – they are implemented as native executables.

    The JNI (the Java Native Interface) is, essentially, a native interface for asking a Java runtime to do various things.

    Amongst a ton of other things, you can use the JNI to invoke methods implemented in Java.

    The JNI has a bunch of different helper methods for invoking different types of methods.

    The method you are asking about, in particular, CallStaticVoidMethod would be used to invoke a Java function such as the one in this example:
    public static void DoSomething() { ... }

    In order for the runtime to invoke that method, it needs to know a few things – such as: information about the current runtime/context/environment (this is the JNIEnv * env parameter), the class the static method is declared in (this is the jclass cls parameter), the method to invoke (this is the jmethodID methodID parameter).

    EDIT:

    Followup to your reply:

    I found it without much trouble in the OpenJDK code.

    http://hg.openjdk.java.net/

    cvmi/cvmi/jdk Common VM Interface

    http://hg.openjdk.java.net/cvmi/cvmi/jdk/archive/tip.zip

    Under:

    ./src/share/javavm/export/jni.h

    void CallStaticVoidMethod(jclass cls, jmethodID methodID, ...) {
        va_list args;
        va_start(args,methodID);
        functions->CallStaticVoidMethodV(this,cls,methodID,args);
        va_end(args);
    }
    

    I don’t know where this is assigned: functions->CallStaticVoidMethodV but I’m sure if you go through the trouble of downloading all the source for the various components you’ll find a struct with that member and/or an assignment to that function pointer – and you can go from there.

    Because it’s supposed to be a standard/common interface for multiple runtimes I wouldn’t be surprised if there was some layer of indirection between the actual implementation and the way it’s exposed through the JNI.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a French site that I want to parse, but am running into
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I want to count how many characters a certain string has in PHP, but
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I am reading a book about Javascript and jQuery and using one of the
Seemingly simple, but I cannot find anything relevant on the web. What is the
I have this code to decode numeric html entities to the UTF8 equivalent character.
I am currently running into a problem where an element is coming back from

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.