This provides the OpenJDK Java Environment.
- java ›
This is a layered charm that generates a deployable OpenJDK charm. Source for this charm is available at github.
This subordinate charm implements the
java interface and requires a principal
charm that provides the
java relation endpoint. Example deployment:
juju deploy ubuntu-devenv juju deploy openjdk juju add-relation ubuntu-devenv openjdk
This determines which OpenJDK packages to install. Valid options are
full. The default is
jre, which will install the OpenJDK Java Runtime
Environment (JRE). Setting this to
full will install the OpenJDK Java
Development Kit (JDK), which includes the JRE.
Switch between the JRE and full (JRE+JDK) with the following:
juju set openjdk java-type=full
Major version of Java to install. This defaults to
8 and installs
openjdk-8-[jre|jdk]. Valid options for Ubuntu releases are:
- 14.04 (Trusty):
- 16.04 (Xenial):
- 18.04 (Bionic):
Switch between Java8 and Java9 with the following:
juju set openjdk java-major=9
- (string) Major version of Java. Defaults to 8.
- (string) Type of install to perform. Valid options are 'jre' or 'full'. The default is 'jre', which will install the OpenJDK Java Runtime Environment (JRE). Setting this to 'full' will install the OpenJDK Java Development Kit (JDK) in addition to the JRE.