Download JDK or JRE distributions on the fly
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 now 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.8.
pip install cjdk
Documentation
Licensing
cjdk is distributed under the MIT license. Please see LICENSE.txt.
Project details
Release history Release notifications | RSS feed
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
File details
Details for the file cjdk-0.2.0.tar.gz
.
File metadata
- Download URL: cjdk-0.2.0.tar.gz
- Upload date:
- Size: 34.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b266a995a443b697f357570c5d9e2a365e74fbb0ed13372501851596e03ec60 |
|
MD5 | 24ca0934da15ed01d0f88c6c0463052c |
|
BLAKE2b-256 | 9b53199471900e70b2446b0fcfbbf9c16a4f3c0615e0b7028a2a93db8fc5c074 |
File details
Details for the file cjdk-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: cjdk-0.2.0-py3-none-any.whl
- Upload date:
- Size: 19.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 908750e4bda179f3f9120655bf5d5b3e5978b5cbce84f01eabbb46e5d62a49b8 |
|
MD5 | 4033906e2a22bc50ca05dec9ba99987a |
|
BLAKE2b-256 | dd42c6932e6d8bf0fffcf928b34e6432ffff47d2445618c2800c99ae79ddb45f |