{"id":15494954,"url":"https://github.com/fracpete/loadlib4j","last_synced_at":"2025-03-28T17:14:37.603Z","repository":{"id":144520039,"uuid":"124604843","full_name":"fracpete/loadlib4j","owner":"fracpete","description":"Little helper class for testing the loading of native libraries in Java.","archived":false,"fork":false,"pushed_at":"2020-10-12T22:35:00.000Z","size":20,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-19T12:15:58.978Z","etag":null,"topics":["java","library-loader"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fracpete.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":"2018-03-09T23:41:03.000Z","updated_at":"2020-10-12T22:35:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"1ed77414-bdb1-41fe-aaf6-0c9a4edb79ff","html_url":"https://github.com/fracpete/loadlib4j","commit_stats":{"total_commits":7,"total_committers":2,"mean_commits":3.5,"dds":0.1428571428571429,"last_synced_commit":"1851dcf8937be591e589136e9fef7ccb3ae2e3ea"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fracpete%2Floadlib4j","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fracpete%2Floadlib4j/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fracpete%2Floadlib4j/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fracpete%2Floadlib4j/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fracpete","download_url":"https://codeload.github.com/fracpete/loadlib4j/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246068302,"owners_count":20718503,"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","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":["java","library-loader"],"created_at":"2024-10-02T08:15:39.838Z","updated_at":"2025-03-28T17:14:37.568Z","avatar_url":"https://github.com/fracpete.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# loadlib4j\nLittle helper class for testing the loading of native libraries in Java.\n\nIt simply uses the `java.lang.System.loadLibrary(String)` call to load the \nlibrary.\n\n\n## Usage\n\n### Command-line\n\nThe following command tries to load the `libmkl_rt.so` library on Linux,\nwhich has to be on the path defined by `LD_LIBRARY_PATH`: \n\n```bash\njava -jar loadlib4j-0.0.1.jar libmkl_rt.so\n```\n\nThe output on stdout will be something like this:\n\n```\nlibmkl_rt.so: false\nlibmkl_rt: false\nmkl_rt: true\n```\n\nAs you can see, loadlib4j also tries the library name without extension\nand `lib` prefix. In the above example, the test succeeds with `mkl_rt`.\n\n### Java\n\nThe same example in Java:\n\n```java\nimport com.github.fracpete.loadlib4j.Main;\nimport java.util.Map;\n...\n// the libraries to test\nString[] libs = new String[]{\"libmkl_rt.so\"};\nMain test = new Main();\nMap\u003cString,Boolean\u003e result = test.testLoading(libs);\n// do something with the results, eg output them\nfor (String lib: result.keySet()) {\n  System.out.println(lib + \" -\u003e \" + result.get(lib));\n}\n```\n\nIn this case, the output will be something like this:\n\n```\nlibmkl_rt.so -\u003e false\nmkl_rt -\u003e false\nlibmkl_rt -\u003e false\n```\n\n\n## Releases\n\n* [0.0.1](https://github.com/fracpete/loadlib4j/releases/download/v0.0.1/loadlib4j-0.0.1.jar)\n\n\n## Maven\n\nUse the following dependency to include the library in your Maven project:\n```xml\n    \u003cdependency\u003e\n      \u003cgroupId\u003ecom.github.fracpete\u003c/groupId\u003e\n      \u003cartifactId\u003eloadlib4j\u003c/artifactId\u003e\n      \u003cversion\u003e0.0.1\u003c/version\u003e\n    \u003c/dependency\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffracpete%2Floadlib4j","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffracpete%2Floadlib4j","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffracpete%2Floadlib4j/lists"}