Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

install-jdk

A simple python utility that can be used to download and install a given Java JDK or JRE. Utilizes the AdoptOpenJDK API.

This is a port of from the GitHub Action installjdk

Currently supports 32-bit and 64-bit versions of Windows, Linux, and macOS.

Install

pip install install-jdk

Usage

import jdk

jdk.install('11')
# Platform dependent install of Java JDK 11 into $HOME/.jdk/<VERSION>

jdk.install('11', impl=jdk.Implementation.OPENJ9)
# Platform dependent install of Java JDK 11 with OpenJ9 into $HOME/.jdk/<VERSION>

jdk.install('11', jre=True)
# Platform dependent install of Java JRE 11 into $HOME/.jre/<VERSION>

print(jdk.OS)       # Detected platform operating system
print(jdk.ARCH)     # Detected platform CPU architecture

download_url = jdk.get_download_url('11')
print(download_url)
# Obtains the platform dependent JDK download url

download_url = jdk.get_download_url('11', jre=True)
print(download_url)
# Obtains the platform dependent JRE download url

jdk.uninstall('11')
# Removes the Java 11 JDK if installed

jdk.uninstall('11', jre=True)
# Removes the Java 11 JRE if installed

Development

Targets Python3.6 and newer.

git clone https://github.com/jyksnw/install-jdk
cd install-jdk
python3 -m venv .env
source .env/bin/activate

pip install -r dev_requirements.txt

Metadata

Release files for install-jdk-patch 0.2.1a0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for install-jdk-patch 0.2.1a0
File Interpreter ABI Platform
install_jdk_patch-0.2.1a0-py3-none-any.whl Python 3 none any Details

Release files / install_jdk_patch-0.2.1a0-py3-none-any.whl

Download URL install_jdk_patch-0.2.1a0-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f5afe561202d1c69b30929f7c88c9790b6497d2aad290334324624f0cdf229e0
BLAKE2b-256 checksum
How to use checksums
65a81b03d143802b845a94cc090d82745e91fe499dc7fb4ca47a53df7c3c957b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.6

Release history Release notifications | RSS feed

This release

0.2.1a0 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page