Skip to main content

Installs AdoptOpenJDK Java

Project description


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.


pip install install-jdk


import jdk

# 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')
# Obtains the platform dependent JDK download url

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

# Removes the Java 11 JDK if installed

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


Targets Python3.6 and newer.

git clone
cd install-jdk
python3 -m venv .env
source .env/bin/activate

pip install -r dev_requirements.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

install-jdk-0.3.0.tar.gz (3.8 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page