Java invoke C/jni.h problem __c++ The open source file cannot be typed

Source: Internet
Author: User

JNI is required in Java to call C + +.

The Java Nativie Interface (JNI, Chinese name Java Local interface) standard is part of the Java platform, which allows Java code to interact with code written in other languages. JNI is a local programming interface that enables Java code that runs within a Java Virtual machine (VM) to interoperate with applications and libraries written in other programming languages, such as C, C + +, and assembly language. The main purpose of JNI is to access hardware and to pursue efficient or reusable C + + libraries.

Reference text:

When you generate a JNI DLL, you are prompted not to find a jni.h solution cannot open include file: ' jni.h ': no such fileor directory

Locate the Include folder in the JDK installation directory containing the Win32 folder and the. h file.



Then copy the appropriate files below to the Include folder under the VC directory

\jdk\include\win32\jawt_md.h

\jdk\include\win32\jni_md.h

\jdk\include\jni.h

VC include in the path of C:\Users\apple\VisualStudio 2010\vs2010 Installpackage\vc\include

And then open vs,error and disappear.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.