{"id":33939544,"url":"https://github.com/astonbitecode/java-locator","last_synced_at":"2025-12-12T15:35:28.349Z","repository":{"id":62441270,"uuid":"171263997","full_name":"astonbitecode/java-locator","owner":"astonbitecode","description":"A utility that locates the active Java installation in the host.","archived":false,"fork":false,"pushed_at":"2025-01-31T08:14:57.000Z","size":41,"stargazers_count":14,"open_issues_count":0,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-25T13:55:16.159Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/astonbitecode.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2019-02-18T10:33:17.000Z","updated_at":"2025-04-27T11:20:11.000Z","dependencies_parsed_at":"2024-05-29T07:31:13.813Z","dependency_job_id":"1198dace-148c-4a46-9528-0c583953bcb7","html_url":"https://github.com/astonbitecode/java-locator","commit_stats":{"total_commits":19,"total_committers":1,"mean_commits":19.0,"dds":0.0,"last_synced_commit":"d9bc51f367738c1e078b65760f7a0fe46301ec15"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/astonbitecode/java-locator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astonbitecode%2Fjava-locator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astonbitecode%2Fjava-locator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astonbitecode%2Fjava-locator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astonbitecode%2Fjava-locator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/astonbitecode","download_url":"https://codeload.github.com/astonbitecode/java-locator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astonbitecode%2Fjava-locator/sbom","scorecard":{"id":213424,"data":{"date":"2025-08-11","repo":{"name":"github.com/astonbitecode/java-locator","commit":"9079bbb2ade7669dc87bfd70bda21b61e3673b8b"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.6,"checks":[{"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":"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 4/16 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":"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":"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci-workflow.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":"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/ci-workflow.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/astonbitecode/java-locator/ci-workflow.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci-workflow.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/astonbitecode/java-locator/ci-workflow.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci-workflow.yml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/astonbitecode/java-locator/ci-workflow.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci-workflow.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/astonbitecode/java-locator/ci-workflow.yml/master?enable=pin","Info:   0 out of   4 GitHub-owned 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":"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: 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-17T01:10:26.168Z","repository_id":62441270,"created_at":"2025-08-17T01:10:26.168Z","updated_at":"2025-08-17T01:10:26.168Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27685559,"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-12-12T02:00:06.775Z","response_time":129,"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":[],"created_at":"2025-12-12T15:35:27.767Z","updated_at":"2025-12-12T15:35:28.340Z","avatar_url":"https://github.com/astonbitecode.png","language":"Rust","readme":"# java-locator\n\n[![crates.io](https://img.shields.io/crates/v/java-locator.svg)](https://crates.io/crates/java_locator)\n![Build](https://github.com/astonbitecode/java-locator/actions/workflows/ci-workflow.yml/badge.svg)\n\nThis is a small utility written in [Rust](https://www.rust-lang.org/).\n\nIt locates the active Java installation in the host.\n\n## Usage\n\nThe utility can be used as a library, or as an executable:\n\n### Library\n\n```rust\nextern crate java_locator;\n\nfn main() -\u003e java_locator::errors::Result\u003c()\u003e {\n    let java_home = java_locator::locate_java_home()?;\n    let dyn_lib_path = java_locator::locate_jvm_dyn_library()?;\n    let libjsig  = java_locator::locate_file(\"libjsig.so\")?;\n    \n    println!(\"The java home is {}\", java_home);\n    println!(\"The jvm dynamic library path is {}\", dyn_lib_path);\n    println!(\"The file libjsig.so is located in {}\", libjsig);\n    \n    Ok(())\n}\n```\n\n### Executable\n\nHaving rust [installed](https://www.rust-lang.org/tools/install), you may install the utility using cargo:\n\n`cargo install java-locator --features build-binary`\n\nAnd then, issuing\n\n`java-locator`\n\nyou should have an output like:\n\n\u003e /usr/lib/jvm/java-11-openjdk-amd64\n\nYou may retrieve the location of the `jvm` shared library:\n\n`java-locator --jvmlib`\n\nshould give an output like:\n\n\u003e /usr/lib/jvm/java-11-openjdk-amd64/lib/server\n\nThis may be used in cases when the `LD_LIBRARY_PATH` (or `PATH` in windows) should be populated.\n\nYou may also retrieve the location of any file inside the Java installation:\n\n`java-locator --file libjsig.so`\n\nand you can even use wildcards:\n\n`java-locator --file libjsig*`\n\nThe latter two commands should return something like:\n\n\u003e /usr/lib/jvm/java-11-openjdk-amd64/lib\n\n## Available Features\n\n* `build-binary`: Generates a `java-locator` executable\n* `locate-jdk-only`: Instructs `java-locator` to locate __only JDKs__.\n\n    In a system that has only JREs installed, `java-locator` will not find any Java installation if this feature is enabled.\n\n    This feature also solves issues when using JDK 8:  In usual installations, the symlinks of the `java` executable in the `$PATH`\n    lead to the `jre` directory that lies inside the JDK 8. When `$JAVA_HOME` is not defined in the system, `java-locator` attempts to locate the\n    Java installation following the symlinks of the `java` executable. Having done that, it cannot locate development artifacts like `jni.h` headers,\n    `javac` etc. With this feature enabled though, `java-locator` will locate development artifacts normally.\n\n## License\n\nAt your option, under: \n\n* Apache License, Version 2.0, (http://www.apache.org/licenses/LICENSE-2.0)\n* MIT license (http://opensource.org/licenses/MIT)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastonbitecode%2Fjava-locator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fastonbitecode%2Fjava-locator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastonbitecode%2Fjava-locator/lists"}