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 7916473
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T14:49:21+00:00 2026-06-03T14:49:21+00:00

In JNI there are jtypes. Like jint for int and jboolean for boolean .

  • 0

In JNI there are jtypes. Like jint for int and jboolean for boolean. I understand the latter types are c/c++ types . But type is a jtype ? In books they mention this type also a native type. What is meant by that ?

EDIT:

What is the use of jtype ?

  • 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-03T14:49:23+00:00Added an answer on June 3, 2026 at 2:49 pm

    From jni.h,

    typedef unsigned char   jboolean
    typedef unsigned short  jchar
    typedef short   jshort
    typedef float   jfloat
    typedef double  jdouble
    typedef long    jint
    typedef jint    jsize
    

    By native types they don’t mean native to Java language, they mean native C or native machine equivalents. The j versions, aid to map Java types to native C types. The advantage of this mapping is, a Java programmer familiar with basic Java types can continue using the same names with the just the added j. He need not bother how are they mapped into the machine’s basic type. It will be taken care by the typedefs. Also if the underlying machine architecture changes, still you need not bother, just chaging the typedefs will do

    Addressing your concerns in comments, _jstring is a class. And jstring is a pointer to this class

    class _jstring : public _jobject {};
    typedef _jstring *jstring;
    

    Just like we have the String class in C++

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

Sidebar

Related Questions

Is there a way using JNI and C# code to create a program that
Is there a way to list methods in a Java class using the JNI
I have a program that's using the FFMPEG binary libraries via JNI. There is
Is there a Java class that maps (via JNI) to the C sockaddr_in structure?
Anyone out there used MATLAB's javaObject() function with a JAR file that uses JNI?
I use Java JNI with Gdal . There are some server side applications built
Is there a way to call STL libraries from JNI, I believe JNI provides
When using JNI to interface between Java and C, javah parses a boolean value
I have a C++ library that I call from Java via JNI. There's a
I would like to know if there is any way I can control a

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.