Metadata-Version: 2.4
Name: jdk4py
Version: 21.0.4.2
Summary: A JDK shipped in a Python package
Project-URL: Repository, https://github.com/activeviam/jdk4py
Author-email: ActiveViam <dev@atoti.io>
License-File: LICENSE
Keywords: java,jdk,jre,jvm
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved :: GNU General Public License v2 (GPLv2)
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# jdk4py

A JDK shipped in a Python package.

[![PyPI version](https://badge.fury.io/py/jdk4py.svg)](https://badge.fury.io/py/jdk4py)

## Install

```bash
pip install jdk4py
```

or as a Conda package:

```bash
conda config --add channels https://conda.atoti.io
conda install jdk4py
```

## Usage

```python
>>> from jdk4py import JAVA, JAVA_HOME, JAVA_VERSION
>>> JAVA_HOME
PosixPath('/Users/johndoe/dev/jdk4py/jdk4py/java-runtime')
>>> JAVA
PosixPath('/Users/johndoe/dev/jdk4py/jdk4py/java-runtime/bin/java')
>>> JAVA_VERSION
(21, 0, 4)
>>> from subprocess import run
>>> some_java_options = ["-Xmx16G", "-Xms2G"]
>>> run(
...     [JAVA, "-jar", "HelloWorld.jar", *some_java_options],
...     capture_output=True,
...     check=True,
...     text=True,
... ).stdout.strip()
"Hello, World!"
```

## Versioning

`jdk4py`'s version contains 4 numbers:

- The first 3 numbers correspond to the JDK version.
- The fourth number is the library API version.
