--- id: jdk4py version: "25.0.2.1" license: unclear license_treatment: copyleft maintenance: active --- # jdk4py — A JDK shipped in a Python package License: copyleft · Maintenance: active · Downloads: 358.9K/mo ## What it is and what it does jdk4py packages a Java Development Kit as a Python library, eliminating the need to install Java separately on your system. When you install it via pip, you get a self-contained JDK binary that the package exposes through Python constants: JAVA (the path to the java executable), JAVA_HOME (the JDK root directory), and JAVA_VERSION (a tuple of version numbers). The package is versioned with four numbers—the first three match the bundled JDK version, and the fourth tracks the library's own API changes. You use it by importing those constants and passing them to subprocess calls or other tools that need to invoke Java. It has no runtime dependencies beyond Python itself, and it ships pre-built wheels for macOS (Intel and ARM), Linux (x86_64 and ARM64), and Windows (x86_64). The project is actively maintained and marked production-stable, with a copyleft GPLv2 license that requires compliance if you redistribute or link it into your own software. Use it for: - Run Java JAR files or applications from a Python script without requiring users to install Java separately. - Build Python tools that wrap or orchestrate Java libraries, passing JVM options like heap size through subprocess. - Deploy containerized Python applications that need Java runtime without adding a separate JDK layer. - Test Java code from a Python test suite by invoking the bundled java executable. - Distribute cross-platform Python packages that depend on Java without asking users to manage JDK installation. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Bundles a JDK runtime into a Python package, providing direct access to Java executables and environment variables for running Java applications from Python code. Yes, if you need to run Java from Python and want to avoid separate JDK installation. The package is actively maintained, production-stable, and supports current Python versions on major platforms. The copyleft license is a consideration for proprietary or redistributed software. Medium install friction (platform-specific wheels, bundled binary) is typical for this use case and not a blocker. ## Install pip install jdk4py uv add jdk4py poetry add jdk4py ## Installing jdk4py Before you install: Medium install friction due to platform-specific wheels (macOS x86_64 and ARM64, Linux aarch64 and x86_64, Windows amd64) and a bundled JDK binary. Actively maintained with recent commits and production-stable status. License in practice: Licensed under GPLv2 (copyleft). Users must comply with copyleft obligations if they distribute derivative works or link this package into their own software. Quickstart: pip install jdk4py from jdk4py import JAVA, JAVA_HOME, JAVA_VERSION from subprocess import run result = run([JAVA, "-jar", "app.jar"], capture_output=True, text=True) print(result.stdout) Requires Python >= 3.10. Platform-specific wheel must match your OS and architecture (macOS, Linux, or Windows on x86_64 or ARM64). Verify before relying: - Exact size of the bundled JDK and its impact on installation time or disk usage. - Whether the package auto-updates the JDK or pins it to a specific version. - Compatibility with non-standard Python environments (e.g., conda-forge, PyPy). ## Package facts - License: not declared (copyleft) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 358.9K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags java runtime in python, jdk python package, run java from python, embedded jdk, java executable python, java-interop, runtime-bundling [View on SkillFed](https://skillfed.io/packages/jdk4py) · [View on PyPI](https://pypi.org/project/jdk4py/)