Click here to Skip to main content
15,881,455 members
Articles / Desktop Programming / Win32

How to Call Java Functions from C Using JNI

Rate me:
Please Sign up or sign in to vote.
4.47/5 (35 votes)
12 Jan 2008CPOL3 min read 429.5K   8K   46  
This article covers calling Java functions from C using JNI. It also covers passing/returning simple parameters, arrays, and structure arrays in Java functions.
// stdafx.h : include file for standard system include files,
//  or project specific include files that are used frequently, but
//      are changed infrequently
//

#if !defined(AFX_STDAFX_H__C2BE5E14_5D60_4EFA_AC09_09119F2DFFC5__INCLUDED_)
#define AFX_STDAFX_H__C2BE5E14_5D60_4EFA_AC09_09119F2DFFC5__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000


// TODO: reference additional headers your program requires here

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_STDAFX_H__C2BE5E14_5D60_4EFA_AC09_09119F2DFFC5__INCLUDED_)

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
United Kingdom United Kingdom
Ahmad Qarshi is an IT Consultant and have good expertise in different development technologies. He loves to code in .NET, JavaFX, Delphi, XSLT/Schematron. Above all very keen to learn new stuff Smile | :)

Comments and Discussions