Click here to Skip to main content
15,891,895 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 431.3K   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.
========================================================================
       CONSOLE APPLICATION : CTest
========================================================================


AppWizard has created this CTest application for you.  

This file contains a summary of what you will find in each of the files that
make up your CTest application.

CTest.dsp
    This file (the project file) contains information at the project level and
    is used to build a single project or subproject. Other users can share the
    project (.dsp) file, but they should export the makefiles locally.

CTest.cpp
    This is the main application source file.


/////////////////////////////////////////////////////////////////////////////
Other standard files:

StdAfx.h, StdAfx.cpp
    These files are used to build a precompiled header (PCH) file
    named CTest.pch and a precompiled types file named StdAfx.obj.


/////////////////////////////////////////////////////////////////////////////
Other notes:

AppWizard uses "TODO:" to indicate parts of the source code you
should add to or customize.

/////////////////////////////////////////////////////////////////////////////

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