Auto-download JDK or JRE and run Java apps from Python or CLI
Project description
cjdk
cjdk (for "cached JDK") is a Python package and command-line tool to download and run JDK (Java Development Kit) or JRE (Java Runtime Environment) distributions.
Previously used JDKs are kept in the user's cache directory, so that future invocations do not require a download.
What for
- Installing exact JDK versions for reproducible testing
- Working with multiple versions of JDKs
- Deploying tools that require Java
Using the command-line interface of cjdk, you can run Java programs using a
one-liner, without having to worry about whether the user has installed a new
enough Java runtime and set JAVA_HOME and PATH to appropriate values.
For example, the following command will run Checkstyle using Temurin JRE 17 (which will be downloaded if this is the first time it is requested):
cjdk --jdk=temurin-jre:11 exec java -jar checkstyle-10.3-all.jar -c style.xml MyApp.java
See the documentation for detailed usage.
cjdk was inspired by Coursier's
java command, and uses Coursier's
JDK index). Unlike Coursier, cjdk
does not require a Java runtime to bootstrap.
Installing
cjdk requires Python 3.10.
pip install cjdk
Documentation
Licensing
cjdk is distributed under the MIT license. Please see LICENSE.txt.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cjdk-0.5.0.tar.gz.
File metadata
- Download URL: cjdk-0.5.0.tar.gz
- Upload date:
- Size: 144.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c83bdb06749a2cdee8e0c9ca1612e10b629286a0a48115ecc2e892e072d5315a
|
|
| MD5 |
e853c5a4a0b2ffd1e0dde34a58d6f551
|
|
| BLAKE2b-256 |
121b9203dbc890918e65b3917b1c0715cccdc8a4cd13f56ed12dca0727f8007f
|
Provenance
The following attestation bundles were made for cjdk-0.5.0.tar.gz:
Publisher:
ci.yml on cachedjdk/cjdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cjdk-0.5.0.tar.gz -
Subject digest:
c83bdb06749a2cdee8e0c9ca1612e10b629286a0a48115ecc2e892e072d5315a - Sigstore transparency entry: 803643234
- Sigstore integration time:
-
Permalink:
cachedjdk/cjdk@f8b3d5d5ab45dbac14e4d556abe4b74e3049ee2b -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/cachedjdk
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@f8b3d5d5ab45dbac14e4d556abe4b74e3049ee2b -
Trigger Event:
push
-
Statement type:
File details
Details for the file cjdk-0.5.0-py3-none-any.whl.
File metadata
- Download URL: cjdk-0.5.0-py3-none-any.whl
- Upload date:
- Size: 27.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e4c563afe9fe9e2841c734b5919bb6e31f371220a1cf23a037642d7ccad59b03
|
|
| MD5 |
9b58c093c0feb21a4ca6438c62aac3d8
|
|
| BLAKE2b-256 |
b6fed8d293c0d88ee6e1d6882039e577d20282535baa45bfa9525f709ebd26a9
|
Provenance
The following attestation bundles were made for cjdk-0.5.0-py3-none-any.whl:
Publisher:
ci.yml on cachedjdk/cjdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cjdk-0.5.0-py3-none-any.whl -
Subject digest:
e4c563afe9fe9e2841c734b5919bb6e31f371220a1cf23a037642d7ccad59b03 - Sigstore transparency entry: 803643235
- Sigstore integration time:
-
Permalink:
cachedjdk/cjdk@f8b3d5d5ab45dbac14e4d556abe4b74e3049ee2b -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/cachedjdk
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@f8b3d5d5ab45dbac14e4d556abe4b74e3049ee2b -
Trigger Event:
push
-
Statement type: