{"id":28075217,"url":"https://github.com/kirbylink/java-warp4j","last_synced_at":"2026-06-01T01:04:34.065Z","repository":{"id":292736917,"uuid":"980808348","full_name":"kirbylink/java-warp4j","owner":"kirbylink","description":"Warp4J rewritten in Java — build platform-specific executables from Java JARs with minimal JREs.","archived":false,"fork":false,"pushed_at":"2026-04-01T05:19:30.000Z","size":257,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2026-04-01T07:59:45.693Z","etag":null,"topics":["amd64","arm64","build-too","cli","cross-compilation","docker","executable","executable-jar","fat-ja","java","java17","jdeps","jlink","native-pack","packagi","raspberry-pi","self-contained","warp","warp4j"],"latest_commit_sha":null,"homepage":"","language":"Java","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/kirbylink.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-05-09T18:49:10.000Z","updated_at":"2026-04-01T05:19:06.000Z","dependencies_parsed_at":"2025-09-01T01:09:01.742Z","dependency_job_id":"a73d3886-92ce-4bb0-84b2-07765aae6768","html_url":"https://github.com/kirbylink/java-warp4j","commit_stats":null,"previous_names":["kirbylink/java-warp4j"],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/kirbylink/java-warp4j","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kirbylink%2Fjava-warp4j","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kirbylink%2Fjava-warp4j/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kirbylink%2Fjava-warp4j/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kirbylink%2Fjava-warp4j/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kirbylink","download_url":"https://codeload.github.com/kirbylink/java-warp4j/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kirbylink%2Fjava-warp4j/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31950891,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-17T17:29:20.459Z","status":"ssl_error","status_checked_at":"2026-04-17T17:28:47.801Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["amd64","arm64","build-too","cli","cross-compilation","docker","executable","executable-jar","fat-ja","java","java17","jdeps","jlink","native-pack","packagi","raspberry-pi","self-contained","warp","warp4j"],"created_at":"2025-05-13T00:55:24.624Z","updated_at":"2026-06-01T01:04:34.058Z","avatar_url":"https://github.com/kirbylink.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://drone.phoenix.ipv64.de/api/badges/David/java-warp4j/status.svg?ref=refs/heads/main)](https://drone.phoenix.ipv64.de/David/java-warp4j) for `main`\u003cbr /\u003e\n[![Build Status develop branch](https://drone.phoenix.ipv64.de/api/badges/David/java-warp4j/status.svg?ref=refs/heads/develop)](https://drone.phoenix.ipv64.de/David/java-warp4j) for `develop`\u003cbr /\u003e\n[![Bugs](https://sonarqube.phoenix.ipv64.de/api/project_badges/measure?project=de.dddns.kirbylink%3Awarp4j\u0026metric=bugs\u0026token=sqb_dd31b2e40b425c0c0283fa9cf0fa1275e03855eb)](https://sonarqube.phoenix.ipv64.de/dashboard?id=de.dddns.kirbylink%3Awarp4j)\n[![Code Smells](https://sonarqube.phoenix.ipv64.de/api/project_badges/measure?project=de.dddns.kirbylink%3Awarp4j\u0026metric=code_smells\u0026token=sqb_dd31b2e40b425c0c0283fa9cf0fa1275e03855eb)](https://sonarqube.phoenix.ipv64.de/dashboard?id=de.dddns.kirbylink%3Awarp4j)\n[![Duplizierte Quellcodezeilen (%)](https://sonarqube.phoenix.ipv64.de/api/project_badges/measure?project=de.dddns.kirbylink%3Awarp4j\u0026metric=duplicated_lines_density\u0026token=sqb_dd31b2e40b425c0c0283fa9cf0fa1275e03855eb)](https://sonarqube.phoenix.ipv64.de/dashboard?id=de.dddns.kirbylink%3Awarp4j)\n[![Technische Schulden](https://sonarqube.phoenix.ipv64.de/api/project_badges/measure?project=de.dddns.kirbylink%3Awarp4j\u0026metric=sqale_index\u0026token=sqb_dd31b2e40b425c0c0283fa9cf0fa1275e03855eb)](https://sonarqube.phoenix.ipv64.de/dashboard?id=de.dddns.kirbylink%3Awarp4j)\n[![Vulnerabilities](https://sonarqube.phoenix.ipv64.de/api/project_badges/measure?project=de.dddns.kirbylink%3Awarp4j\u0026metric=vulnerabilities\u0026token=sqb_dd31b2e40b425c0c0283fa9cf0fa1275e03855eb)](https://sonarqube.phoenix.ipv64.de/dashboard?id=de.dddns.kirbylink%3Awarp4j)\n[![Quellcodezeilen](https://sonarqube.phoenix.ipv64.de/api/project_badges/measure?project=de.dddns.kirbylink%3Awarp4j\u0026metric=ncloc\u0026token=sqb_dd31b2e40b425c0c0283fa9cf0fa1275e03855eb)](https://sonarqube.phoenix.ipv64.de/dashboard?id=de.dddns.kirbylink%3Awarp4j)\u003cbr /\u003e\n[![SQALE-Bewertung](https://sonarqube.phoenix.ipv64.de/api/project_badges/measure?project=de.dddns.kirbylink%3Awarp4j\u0026metric=sqale_rating\u0026token=sqb_dd31b2e40b425c0c0283fa9cf0fa1275e03855eb)](https://sonarqube.phoenix.ipv64.de/dashboard?id=de.dddns.kirbylink%3Awarp4j)\n[![Reliability Rating](https://sonarqube.phoenix.ipv64.de/api/project_badges/measure?project=de.dddns.kirbylink%3Awarp4j\u0026metric=reliability_rating\u0026token=sqb_dd31b2e40b425c0c0283fa9cf0fa1275e03855eb)](https://sonarqube.phoenix.ipv64.de/dashboard?id=de.dddns.kirbylink%3Awarp4j)\n[![Security Rating](https://sonarqube.phoenix.ipv64.de/api/project_badges/measure?project=de.dddns.kirbylink%3Awarp4j\u0026metric=security_rating\u0026token=sqb_dd31b2e40b425c0c0283fa9cf0fa1275e03855eb)](https://sonarqube.phoenix.ipv64.de/dashboard?id=de.dddns.kirbylink%3Awarp4j)\u003cbr /\u003e\n[![Alarmhinweise](https://sonarqube.phoenix.ipv64.de/api/project_badges/measure?project=de.dddns.kirbylink%3Awarp4j\u0026metric=alert_status\u0026token=sqb_dd31b2e40b425c0c0283fa9cf0fa1275e03855eb)](https://sonarqube.phoenix.ipv64.de/dashboard?id=de.dddns.kirbylink%3Awarp4j)\u003cbr /\u003e \n[![Abdeckung](https://sonarqube.phoenix.ipv64.de/api/project_badges/measure?project=de.dddns.kirbylink%3Awarp4j\u0026metric=coverage\u0026token=sqb_dd31b2e40b425c0c0283fa9cf0fa1275e03855eb)](https://sonarqube.phoenix.ipv64.de/dashboard?id=de.dddns.kirbylink%3Awarp4j) for `main`\u003cbr /\u003e \n[![Abdeckung](https://sonarqube.phoenix.ipv64.de/api/project_badges/measure?branch=develop\u0026project=de.dddns.kirbylink%3Awarp4j\u0026metric=coverage\u0026token=sqb_dd31b2e40b425c0c0283fa9cf0fa1275e03855eb)](https://sonarqube.phoenix.ipv64.de/dashboard?id=de.dddns.kirbylink%3Awarp4j\u0026branch=develop) for `develop`\u003cbr /\u003e\n\n![GitHub Release](https://img.shields.io/github/v/release/kirbylink/java-warp4j)\n![GitHub Downloads](https://img.shields.io/github/downloads/kirbylink/java-warp4j/latest/total)\n![GitHub Downloads](https://img.shields.io/github/downloads/kirbylink/java-warp4j/total)\n![License](https://img.shields.io/github/license/kirbylink/java-warp4j)\n\n# java-warp4j\n\nWarp4J rewritten in Java — build platform-specific executables from Java JARs with minimal JREs.\n\n---\n\n## Table of Contents\n\n- [Introduction](#introduction)\n- [Features](#features)\n- [Prerequisites](#prerequisites)\n- [Usage](#usage)\n  - [Using the Compiled JAR](#using-the-compiled-jar)\n  - [Using the Source Code](#using-the-source-code)\n  - [Command-Line Parameters](#command-line-parameters)\n  - [Offline Support](#offline-support)\n- [Examples](#examples)\n  - [Example 1: Create a Linux x64 executable](#example-1-create-a-linux-x64-executable)\n  - [Example 2: Cross-compile for macOS and Windows](#example-2-cross-compile-for-macos-and-windows)\n- [Docker](#docker)\n  - [Using Docker](#using-docker)\n  - [Building the Docker Image](#building-the-docker-image)\n  - [Running the Docker Container](#running-the-docker-container)\n  - [Offline Usage with Docker](#offline-usage-with-docker)\n  - [Prebuilt Docker Images](#prebuilt-docker-images)\n- [Building the Project](#building-the-project)\n- [Contributing](#contributing)\n- [License](#license)\n- [Contact](#contact)\n\n---\n\n## Introduction\n\nThis project is a Java-based reimplementation of [warp4j](https://github.com/guziks/warp4j), which itself wraps [warp](https://github.com/dgiagio/warp) — a powerful CLI tool for bundling Java apps into native-like executables.\u003cbr /\u003e\nIn addition to the original projects, there are already improved forks with more features: [warp4j](https://github.com/kirbylink/warp4j) and [warp](https://github.com/kirbylink/warp)\n\n### Why a new implementation?\n\n* **The original projects haven't been maintained for years.**\n* **The original warp project only supports x64 platforms.** That means no Raspberry Pi or ARM builds.\n* **warp4j was a shell script**, making it:\n\n  * Incompatible with Windows\n  * Hard to test and extend\n  * Painful to debug or modularize\n\n### This version (`java-warp4j`) fixes all of that:\n\n✅ Fully written in Java\u003cbr /\u003e\n✅ Easily testable and type-safe\u003cbr /\u003e\n✅ Runs on all systems that support Java\u003cbr /\u003e\n✅ Produces builds for **any** combination of platform and architecture\u003cbr /\u003e\n✅ Can build **itself**\u003cbr /\u003e\n✅ Offline Support\u003cbr /\u003e\n\n### Tradeoffs\n\n❌ Requires a working JDK to run the tool (unlike the shell-based original)\u003cbr /\u003e\n❌ Slightly larger in size due to embedded dependencies\n\nStill, the added **flexibility**, **stability**, and **cross-platform support** make `java-warp4j` a practical alternative to the original tools.\n\n\nExecutable versions of `java-warp4j` are available under [GitHub Releases](https://github.com/kirbylink/java-warp4j/releases).\u003cbr /\u003e\nThese versions include the tool bundled with a minimal JRE, and can be used without Java being installed.\n\n---\n\n## Features\n\n- 💡 **Java-based CLI tool** for building native-like executables\n- 🌐 Automatically fetches and caches the matching JDK (architecture + platform + version) from the Adoptium API when not already present\n- 📦 **Minimized JDK** per target via `jlink` (only required modules included)\n- 🧪 **Testable \u0026 typed**: fully unit-tested and type-safe (unlike shell scripts)\n- 🔁 **Self-hosted**: the tool can package itself\n- 🪟 🐧 🍏 Supports **Linux**, **Windows**, and **macOS**\n- 🏗️ Generates `.exe`, `.sh`, `.bat` or `.app` bundles\n- 🪄 Automatically extracts Spring Boot dependencies\n- 🐳 Docker support for cross-compiling and CI pipelines\n- 📦 Prebuilt Docker Images available\n- 🧠 Gracefully skips targets when builds or downloads fail\n\n---\n\n## Prerequisites\n\nTo use `java-warp4j`:\n\n- Java 17 or higher\n- Maven (if building from source)\n- Docker (optional, for container-based builds)\n\n---\n\n## Usage\n\n### Using the Compiled JAR\n\nAfter building or downloading `java-warp4j`, run:\n\n```bash\njava -jar warp4j-1.3.3-jar-with-dependencies.jar \\\n  --jar my-app.jar \\\n  --output ./target \\\n  --optimize \\\n  --linux-x64 \\\n  --linux-aarch64 \\\n  --windows-x64 \\\n  --macos-x64 \\\n  --prefix myapp\n```\n\n### Using the Source Code\n\nIf you want to build and run directly from source, see [BUILD.md](./BUILD.md).\n\n---\n\n### Command-Line Parameters\n```sh\nUsage: warp4j [-hsv] [--linux] [--linux-aarch64] [--linux-x64] [--macos]\n              [--macos-aarch64] [--macos-x64] [--no-compress] [--optimize]\n              [--pull] [--spring-boot] [--windows] [--windows-aarch64]\n              [--windows-x64] [--add-modules=\u003cadditionalModules\u003e]\n              [--arch=\u003carchitecture\u003e] [-cp=\u003cclassPath\u003e] [-j=\u003cjavaVersion\u003e]\n              --jar=\u003cjarFilePath\u003e [--jdk=\u003cjdkPath\u003e] [-o=\u003coutputDirectoryPath\u003e]\n              [-p=\u003cprefix\u003e]\nTurn JAR into a self-contained executable\n      --add-modules=\u003cadditionalModules\u003e\n                             A list of additional java modules that should be\n                              added to the optimized JDK. Separate each module\n                              with commas and no spaces\n      --arch=\u003carchitecture\u003e Target architecture (x64 or aarch64) Default: both\n      -cp, --class-path=\u003cclassPath\u003e\n                            Additional classpaths for jdeps seperated by comma\n  -h, --help                Show this message and exit\n  -j, --java-version=\u003cjavaVersion\u003e\n                            Override JDK/JRE version (default: 17)\n      --jar=\u003cjarFilePath\u003e   JAR file to be converted\n      --jdk=\u003cjdkPath\u003e       Path to JDK that contains the binaries jdep(.exe)\n                              and jlink(.exe)\n      --linux               Create binary for Linux\n      --linux-aarch64       Create binary for Linux with aarch64 architecture\n      --linux-x64           Create binary for Linux with x64 architecture\n      --macos               Create binary for macOS\n      --macos-aarch64       Create binary for macOS with aarch64 architecture\n      --macos-x64           Create binary for macOS with x64 architecture\n      --no-compress         Skip compression of the created binary file.\n  -o, --output=\u003coutputDirectoryPath\u003e\n                            Output directory (default: ./warped)\n      --optimize            Use optimized JRE instead of JDK\n  -p, --prefix=\u003cprefix\u003e     Prefix for extracted application folder\n      --pull                Check if more recent JDK/JRE distro is available.\n                              By default latest cached version that matches\n  -s, --silent              Use javaw.exe instead of java.exe (Windows only)\n      --spring-boot         Extract class-path from JAR to fetch BOOT-INF/lib/\n                              modules\n  -v, --verbose             Enable verbose logging\n      --windows             Create binary for Windows\n      --windows-aarch64     Create binary for Windows with aarch64 architecture\n      --windows-x64         Create binary for Windows with x64 architecture\n```\n\n### Offline Support\n\n`java-warp4j` works fully **offline** as long as the required components are available locally:\n\n* The appropriate **warp-packer** binary must exist at\n  `~/.local/share/warp4j/warp/warp-packer` (or the equivalent for the platform).\n\n* For each target platform and architecture, a corresponding **JDK** must be pre-downloaded under:\n\n```\n~/.local/share/warp4j/jdk/\u003cplatform\u003e/\u003carchitecture\u003e/jdk-\u003cversion\u003e+\u003cbuild\u003e\n```\n\nExample:\n\n```\n~/.local/share/warp4j/jdk/windows/x64/jdk-21.0.7+6\n```\n\n### Prebuilt Docker Images\n\nPrebuilt Docker images are published to [GitHub Container Registry (GHCR)](https://github.com/users/kirbylink/packages/container/package/java-warp4j) and follow a semantic versioning scheme:\n\n* `ghcr.io/kirbylink/java-warp4j:latest` - always points to the newest stable version\n* `ghcr.io/kirbylink/java-warp4j:v1.2.3` - full release version\n* `ghcr.io/kirbylink/java-warp4j:v1.2` - latest patch of v1.2\n* `ghcr.io/kirbylink/java-warp4j:v1` - latest of major version 1\n\nTo use it directly in Docker:\n\n```bash\ndocker pull ghcr.io/kirbylink/java-warp4j:latest\n```\n\n---\n\n## Examples\n\n### Example 1: Create a Linux aarch64 executable for [java-warp4j](https://github.com/kirbylink/java-warp4j)\n\n```bash\njava -jar warp4j-1.3.3-jar-with-dependencies.jar \\\n    --jar /home/developer/git/java-warp4j/target/warp4j-1.3.3-jar-with-dependencies.jar \\\n\t--output /home/developer/git/java-warp4j/target \\\n\t--optimize \\\n\t--class-path /home/developer/git/java-warp4j/target/classes \\\n\t--add-modules jdk.crypto.ec \\\n\t--linux-aarch64 \\\n\t--prefix warp4j\n```\n\n### Example 2: Cross-compile for macOS and Windows for [java-e-liquid-calculator](https://github.com/kirbylink/java-e-liquid-calculator)\n\n```bash\njava -jar warp4j-1.3.3-jar-with-dependencies.jar \\\n    --jar /home/developer/git/java-e-liquid-calculator/target/e-liquid-calculator-1.1.6-jar-with-dependencies.jar \\\n\t--output /home/developer/git/java-e-liquid-calculator/target \\\n\t--optimize \\\n\t--spring-boot \\\n\t--windows-x64 \\\n\t--macos-x64 \\\n\t--prefix e-liquid-calculator\n```\n\n---\n\n## Docker\n\n### Using Docker\n\nYou can use Docker to bundle your app into native executables **without installing Java** locally.\n\n### Building the Docker Image\n\n```bash\ndocker build --build-arg TARGET_ARCH=x64 -t java-warp4j .\n```\nor\n```bash\ndocker buildx build --platform linux/amd64 --build-arg TARGET_ARCH=x64 -t java-warp4j .\n```\n\n### Running the Docker Container\n\n```bash\ndocker run --rm \\\n  -v /home/developer/warp4j:/data \\\n  java-warp4j \\\n  --spring-boot \\\n  --jar /data/e-liquid-calculator-1.1.6-jar-with-dependencies.jar \\\n  --linux-x64 \\\n  --pull \\\n  --output /data \\\n  --optimize \\\n  --prefix e-liquid-calculator\n```\n\n### Offline Usage with Docker\n\nThe application can also run **completely offline** if the required dependencies are pre-downloaded and mounted into the container:\n\n```bash\ndocker run --rm \\\n  -v /home/developer/warp4j/output:/data \\                              # Output folder for the generated bundle\n  -v /home/developer/warp4j/cache/jdk:/root/.local/share/warp4j/jdk \\   # Cached JDKs for different platforms\n  -v /home/developer/warp4j/cache/warp:/root/.local/share/warp4j/warp \\ # Cached warp-packer binary\n  java-warp4j \\\n  --spring-boot \\\n  --jar /data/e-liquid-calculator-1.1.6-jar-with-dependencies.jar \\\n  --linux-x64 \\\n  --output /data \\\n  --optimize \\\n  --prefix e-liquid-calculator\n```\n\n💡 **Note:** For offline use, the following files must already exist:\n\n* `warp4j/cache/jdk/linux/x64/jdk-21.0.7+6` → extracted full JDK directory\n* `warp4j/cache/warp/warp-packer` → warp binary for the platform\n\nThese directories can be populated:\n\n* manually (e.g. by downloading and extracting the JDKs yourself),\n* or by running the tool once online (it will cache all needed components).\n\nFor more information about offline capabilities, see [Offline Support](#offline-support).\n\n---\n\n## Building the Project\n\nFor detailed instructions on how to build the project from source, please refer to [BUILD.md](./BUILD.md).\n\n---\n\n## Contributing\n\nContributions to the project from the community are welcome. Please read the [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines on how to contribute.\n\n---\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](./LICENSE) file for details.\n\n---\n\n## Contact\n\nFor any questions or feedback, please open an issue on GitHub.\n\n---","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkirbylink%2Fjava-warp4j","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkirbylink%2Fjava-warp4j","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkirbylink%2Fjava-warp4j/lists"}