{"id":18930623,"url":"https://github.com/hmasum52/java-custom-jre-tutorial","last_synced_at":"2025-10-13T06:06:04.395Z","repository":{"id":110315898,"uuid":"345365478","full_name":"hmasum52/java-custom-jre-tutorial","owner":"hmasum52","description":"This project demonstrates how to make custom JRE to run a java project on any machine.","archived":false,"fork":false,"pushed_at":"2021-03-07T14:35:51.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-13T06:05:31.964Z","etag":null,"topics":["custom-jre","java-11","jdeps","jlink","module"],"latest_commit_sha":null,"homepage":"https://hmasum18.github.io/java-custom-jre-tutorial/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hmasum52.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2021-03-07T14:20:11.000Z","updated_at":"2021-03-07T14:35:53.000Z","dependencies_parsed_at":"2023-03-13T13:55:39.725Z","dependency_job_id":null,"html_url":"https://github.com/hmasum52/java-custom-jre-tutorial","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hmasum52/java-custom-jre-tutorial","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmasum52%2Fjava-custom-jre-tutorial","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmasum52%2Fjava-custom-jre-tutorial/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmasum52%2Fjava-custom-jre-tutorial/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmasum52%2Fjava-custom-jre-tutorial/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hmasum52","download_url":"https://codeload.github.com/hmasum52/java-custom-jre-tutorial/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmasum52%2Fjava-custom-jre-tutorial/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279013945,"owners_count":26085431,"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-13T02:00:06.723Z","response_time":61,"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":["custom-jre","java-11","jdeps","jlink","module"],"created_at":"2024-11-08T11:38:18.215Z","updated_at":"2025-10-13T06:06:04.379Z","avatar_url":"https://github.com/hmasum52.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n### [Source code](https://github.com/Hmasum18/java-custom-jre-tutorial)\n\n## Table of content\n- [Compiling a Module](#compiling-a-module)\n  * [Compile and create class file in out folder](#compile-and-create-class-file-in-out-folder)\n  * [Compile and create class file in out folder](#compile-and-create-class-file-in-out-folder-1)\n  * [Run the class file from out folder](#run-the-class-file-from-out-folder)\n    + [ouput](#ouput)\n- [Using jdeps to List the Dependent Modules](#using-jdeps-to-list-the-dependent-modules)\n    + [output](#output)\n- [Creating a Custom JRE with jlink](#creating-a-custom-jre-with-jlink)\n- [Run code with custom JRE](#run-code-with-custom-jre)\n- [Creating Custom JRE with Launcher Scripts](#creating-custom-jre-with-launcher-scripts)\n\n## Compiling a Module\n### Compile and create class file in out folder\n```bash\njavac -d \u003coutput location\u003e module-info.java\n\n//example\njavac -d out module-info.java\n```\n\n### Compile and create class file in out folder\n```bash\njavac -d \u003coutput location\u003e --module-path \u003cmodule-info.class location\u003e \u003cjava file location\u003e\n\n//example\njavac -d out --module-path out github\\hmasum18\\jlinkTest\\HelloWorld.java\n```\n\n### Run the class file from out folder\n```bash\njava --module-path \u003cmodule-info.class location\u003e --module \u003cmodule name\u003e/\u003cfile name with full package name\u003e\n\n//example\njava --module-path out --module helloWorld/github.hmasum18.jlinkTest.HelloWorld\n```\n#### ouput\n```\nMar 07, 2021 6:34:41 PM github.hmasum18.jlinkTest.HelloWorld main\nINFO: hello world from masum\n```\n\n## Using jdeps to List the Dependent Modules\n```bash\njdeps --module-path \u003call the module path separated by semi colon(;)\u003e -s --module \u003cmodule names separated by comma\u003e\n\n//example\njdeps --module-path out -s --module helloWorld\n```\n#### output\n```\nhelloWorld -\u003e java.base\nhelloWorld -\u003e java.logging\n```\n\nor \n```bash\njdeps --list-deps --module-path \u003call the module path separated by semi colon(;)\u003e -add-module \u003cmodule names separated by comma\u003e\n\n//example\njdeps --list-deps  --module-path out --add-modules helloWorld\n\n//example with javafx\njdeps --list-deps  --module-path \"lib\\javafx-sdk-11.0.2\\lib\";\"lib\\gson-2.8.6.jar\";\"lib\\jfoenix-9.0.10.jar\";\"out\\production\\CarShowRoomFrontend\" --add-modules fontend\n```\n\n\n## Creating a Custom JRE with jlink\n```bash\njdeps --module-path \u003call the module path separated by semi colon(;)\u003e --add-modules \u003cmodule names\u003e --output \u003ccustom jre output location\u003e\n\n//example\njlink --module-path \"%JAVA_HOME%\\jmods\";out --add-modules helloWorld --output customjrefolder\n```\n\n## Run code with custom JRE\n\n```bash\n\"\u003ccustom jre bin file location\u003e\\java\" --module-path \u003cmodule-info.class file location\u003e -m \u003cmodule name/java file location with package name\u003e\n\n//example\n\"customjrefolder\\bin\\java\" --module-path out -m helloWorld/github.hmasum18.jlinkTest.HelloWorld\n```\n\n## Creating Custom JRE with Launcher Scripts\n```bash\njlink --launcher helloWorldLauncher=helloWorld/github.hmasum18.jlinkTest/HelloWorld --module-path \"%JAVA_HOME%\\jmods\";out --add-modules helloWorld --output customJreLauncherFolder\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhmasum52%2Fjava-custom-jre-tutorial","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhmasum52%2Fjava-custom-jre-tutorial","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhmasum52%2Fjava-custom-jre-tutorial/lists"}