Giter Site home page Giter Site logo

scapix-com / example2 Goto Github PK

View Code? Open in Web Editor NEW
10.0 4.0 0.0 39 KB

Example for Scapix C++ JNI library

Home Page: https://www.scapix.com/java_link

License: Other

CMake 18.44% Shell 2.18% C++ 76.93% Batchfile 2.45%
java jni cpp cpp11 cpp14 cpp17 jni-android jni-wrapper jni-sample jni-bindings

example2's Introduction

Example for Scapix JNI

Scapix JNI is a modern C++20 wrapper 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();
}

Install and build this example (Windows, macOS, Linux)

$ git clone https://github.com/scapix-com/example2
$ cd example2
$ ./build.sh default

example2's People

Contributors

boris-rasin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.