{"id":37520179,"url":"https://github.com/mitchdowd/jnipp","last_synced_at":"2026-01-16T08:14:51.557Z","repository":{"id":45522841,"uuid":"71559297","full_name":"mitchdowd/jnipp","owner":"mitchdowd","description":"C++ wrapper for the Java Native Interface","archived":false,"fork":false,"pushed_at":"2024-11-08T17:45:32.000Z","size":112,"stargazers_count":106,"open_issues_count":10,"forks_count":29,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-11-08T18:34:46.596Z","etag":null,"topics":["cplusplus","java","java-native-interface","jni","jnipp"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mitchdowd.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2016-10-21T11:26:46.000Z","updated_at":"2024-11-08T17:45:36.000Z","dependencies_parsed_at":"2022-07-17T02:16:14.656Z","dependency_job_id":"8688a6f9-d6ee-4182-a2bf-c49dfdd1a2f2","html_url":"https://github.com/mitchdowd/jnipp","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/mitchdowd/jnipp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitchdowd%2Fjnipp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitchdowd%2Fjnipp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitchdowd%2Fjnipp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitchdowd%2Fjnipp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mitchdowd","download_url":"https://codeload.github.com/mitchdowd/jnipp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitchdowd%2Fjnipp/sbom","scorecard":{"id":650215,"data":{"date":"2025-08-11","repo":{"name":"github.com/mitchdowd/jnipp","commit":"cdd6293fca985993129f5ef5441709fc49ee507f"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.6,"checks":[{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/jnipp.yml:59: update your workflow using https://app.stepsecurity.io/secureworkflow/mitchdowd/jnipp/jnipp.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/jnipp.yml:61: update your workflow using https://app.stepsecurity.io/secureworkflow/mitchdowd/jnipp/jnipp.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/jnipp.yml:8: update your workflow using https://app.stepsecurity.io/secureworkflow/mitchdowd/jnipp/jnipp.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/jnipp.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/mitchdowd/jnipp/jnipp.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/jnipp.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/mitchdowd/jnipp/jnipp.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/jnipp.yml:35: update your workflow using https://app.stepsecurity.io/secureworkflow/mitchdowd/jnipp/jnipp.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/jnipp.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/mitchdowd/jnipp/jnipp.yml/master?enable=pin","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":2,"reason":"Found 5/24 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/jnipp.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 18 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-21T13:19:17.596Z","repository_id":45522841,"created_at":"2025-08-21T13:19:17.596Z","updated_at":"2025-08-21T13:19:17.596Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478047,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T06:30:42.265Z","status":"ssl_error","status_checked_at":"2026-01-16T06:30:16.248Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["cplusplus","java","java-native-interface","jni","jnipp"],"created_at":"2026-01-16T08:14:50.906Z","updated_at":"2026-01-16T08:14:51.525Z","avatar_url":"https://github.com/mitchdowd.png","language":"C++","readme":"# Java Native Interface for C++\n\n## Overview\n\nJNIPP is just a C++ wrapper for the standard Java Native Interface (JNI). It\ntries to take some of the long-winded annoyance out of integrating your Java\nand C++ code.\n\nWhile this project has so far just been a utility library for my own usage,\nit seems to have caught the eye of some others who have also been looking for\na suitable C++ JNI layer.  If you have feature requests, do not hesitate to\nsubmit them as Github issues.  Please be descriptive in your feature request.\nThe more useful information you provide - along with justification on why it\nshould be implemented - the more likely it is that I will add your feature.\n\n## Requirements\n\nTo compile you will need:\n\n- A C++11 compatible compiler\n- An installation of the Java Development Kit (JDK)\n- The `JAVA_HOME` environment variable, directed to your JDK installation.\n\n## Usage\n\n\u003e For comprehensive examples on how to use *jnipp*, see the `tests` project\n\u003e in the project source code.\n\nThere are two situations where the Java Native Interface would be needed.\n\n- A Java application calling C/C++ functions; or\n- A C/C++ application calling Java methods\n\n### Calling Java from C++\n\nThe following is an example of calling Java from C++.\n\n```C++\n#include \u003cjnipp.h\u003e\n\nint main()\n{\n    // An instance of the Java VM needs to be created.\n    jni::Vm vm;\n\n    // Create an instance of java.lang.Integer\n    jni::Class Integer = jni::Class(\"java/lang/Integer\");\n    jni::Object i = Integer.newInstance(\"1000\");\n\n    // Call the `toString` method on that integer\n    std::string str = i.call\u003cstd::string\u003e(\"toString\");\n\n    // The Java VM is automatically destroyed when it goes out of scope.\n    return 0;\n}\n```\n\n### Calling C++ from Java\n\nConsider a basic Java program:\n\n```Java\npackage com.example;\n\nclass Demo {\n    public int value;\n\n    public static void main(String[] args) {\n        Demo demo = new Demo();\n        demo.value = 1000;\n        demo.run();\n    }\n\n    public native void run();\n}\n```\n\nA matching C++ library which uses *jnipp* could look like:\n\n```C++\n#include \u003cjnipp.h\u003e\n#include \u003ciostream\u003e\n\n/*\n    The signature here is defind by the JNI standard, so must be adhered to.\n    Although, to prevent pollution of the global namespace, the JNIEnv and\n    jobject types defind by the standard JNI have been placed into the\n    jni namespace.\n */\nextern \"C\" void Java_com_example_Demo_run(jni::JNIEnv* env, jni::jobject obj)\n{\n    // jnipp only needs initialising once, but it doesn't hurt to do it again.\n    jni::init(env);\n\n    // Capture the supplied object.\n    jni::Object demo(obj);\n\n    // Print the contents of the `value` field to stdout.\n    std::cout \u003c\u003c demo.get\u003cint\u003e(\"value\") \u003c\u003c std::endl;\n}\n```\n\n## Configuration\n\nBy default, *jnipp* uses std::runtime_error as the base exception class. If you wish,\nyou can define `JNIPP_EXCEPTION_CLASS` to be the exception class you wish to use, before\nincluding `jnipp.h`. It just needs a `const char*` constructor.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmitchdowd%2Fjnipp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmitchdowd%2Fjnipp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmitchdowd%2Fjnipp/lists"}