Example2 for Scapix JNI
Scapix JNI is a modern C++20 library for Java Native Interface (JNI). It provides type-safe APIs and automatic resource management, with zero runtime overhead compared to manually written JNI code.
// Generated C++ headers for all JDK/Android classes:
#include <scapix/java_api/java/lang/System.h>
#include <scapix/java_api/java/util/Locale.h>
#include <scapix/java_api/java/text/DateFormatSymbols.h>
namespace jni = scapix::jni;
using namespace scapix::java_api;
void example()
{
// call any Java functions from any Java classes
auto version = java::lang::System::getProperty("java.version");
auto languages = java::util::Locale::getISOLanguages();
auto zone_strings = java::text::DateFormatSymbols::getInstance()->getZoneStrings();
auto properties = java::lang::System::getProperties();
}git clone https://github.com/scapix-com/scapix-jni-example2
cd scapix-jni-example2
./build.sh default