Java
Java is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea (a part of Pacific Ocean) to the north. With a population of 156.9 million people (including Madura) in mid 2024, proje ...
from C or C++ by automatically generating the necessary JNI code.
GIWS is released under the
CeCILL
CeCILL (from CEA CNRS INRIA Logiciel Libre) is a free software license adapted to both international and French legal matters, in the spirit of and retaining compatibility with the GNU General Public License (GPL).
It was jointly developed by ...
license.
Example
The following Java class does some simple computation.
package basic_example;
import java.lang.Math;
public class MyComplexClass
GIWS gives the capability to call it from C++.
#include
#include "basic_example.hxx"
#include
JavaVM* create_vm()
using namespace basic_example;
using namespace std;
int main()
To generate the binding, GIWS uses a XML declaration. GIWS will generate the JNI code to call the Java object.
See also
*
SWIG
The Simplified Wrapper and Interface Generator (SWIG) is an open-source software tool used to connect computer programs or libraries written in C or C++ with scripting languages such as Lua, Perl, PHP, Python, R, Ruby, Tcl, and other lang ...
allows one to call C or C++ from higher level languages