{"id":20841649,"url":"https://github.com/scapix-com/example2","last_synced_at":"2025-10-10T02:32:39.921Z","repository":{"id":87661239,"uuid":"175460416","full_name":"scapix-com/example2","owner":"scapix-com","description":"Example for Scapix C++ JNI library","archived":false,"fork":false,"pushed_at":"2025-08-15T18:57:47.000Z","size":41,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-09-06T15:42:21.793Z","etag":null,"topics":["cpp","cpp11","cpp14","cpp17","java","jni","jni-android","jni-bindings","jni-sample","jni-wrapper"],"latest_commit_sha":null,"homepage":"https://www.scapix.com/java_link","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scapix-com.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-03-13T16:38:30.000Z","updated_at":"2025-08-15T18:57:50.000Z","dependencies_parsed_at":"2023-03-05T16:00:26.426Z","dependency_job_id":"466b4d7a-3607-4182-abe0-5ffaa8a1a732","html_url":"https://github.com/scapix-com/example2","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/scapix-com/example2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scapix-com%2Fexample2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scapix-com%2Fexample2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scapix-com%2Fexample2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scapix-com%2Fexample2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scapix-com","download_url":"https://codeload.github.com/scapix-com/example2/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scapix-com%2Fexample2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002538,"owners_count":26083400,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","cpp11","cpp14","cpp17","java","jni","jni-android","jni-bindings","jni-sample","jni-wrapper"],"created_at":"2024-11-18T01:21:07.023Z","updated_at":"2025-10-10T02:32:39.906Z","avatar_url":"https://github.com/scapix-com.png","language":"C++","readme":"# Example for [Scapix JNI](https://www.scapix.com/jni/)\n\n[Scapix JNI](https://www.scapix.com/jni/) is a modern C++20 wrapper for Java Native Interface ([JNI](https://docs.oracle.com/en/java/javase/21/docs/specs/jni/)).\nIt provides type-safe APIs and automatic resource management, with ZERO runtime overhead compared to manually written JNI code.\n\n```cpp\n// Generated C++ headers for all JDK/Android classes:\n\n#include \u003cscapix/java_api/java/lang/System.h\u003e\n#include \u003cscapix/java_api/java/util/Locale.h\u003e\n#include \u003cscapix/java_api/java/text/DateFormatSymbols.h\u003e\n\nnamespace jni = scapix::jni;\nusing namespace scapix::java_api;\n\nvoid example()\n{\n    // call any Java functions from any Java classes\n\n    auto version = java::lang::System::getProperty(\"java.version\");\n    auto languages = java::util::Locale::getISOLanguages();\n    auto zone_strings = java::text::DateFormatSymbols::getInstance()-\u003egetZoneStrings();\n    auto properties = java::lang::System::getProperties();\n}\n```\n\n### Install and build this example (Windows, macOS, Linux)\n\n```bash\n$ git clone https://github.com/scapix-com/example2\n$ cd example2\n$ ./build.sh default\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscapix-com%2Fexample2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscapix-com%2Fexample2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscapix-com%2Fexample2/lists"}