Upgrade Nexus Repository Java Version
This page explains how to upgrade the Java runtime used by your Nexus Repository instance. Before upgrading, ensure that the Java runtime meets the requirements of your target Nexus Repository version.
If you use the bundled Java runtime, you typically do not need to upgrade your system Java separately. If you use an external Java runtime, ensure that it is compatible with the Nexus Repository version you are upgrading to. Before you begin, review the supported Java versions for your Nexus Repository instance. For details, see the Java Runtime Compatibility Matrix.
Metrics exported from the JVM through the metrics API endpoint and Prometheus can vary between Java versions.
Sonatype provides alternate distribution binaries and configuration for supported Java versions. Before you switch to a different Java version, download the correct distribution.
Upgrade with Docker
Sonatype Nexus Repository official Docker images and installers include the Java runtime required by the corresponding Nexus Repository version. When upgrading Nexus Repository, select the Docker image tag for your target release. You do not need to upgrade Java separately.
For earlier Nexus Repository versions that provide Java-specific Docker tags, such as -java17, select a tag that is compatible with your target Nexus Repository version.
For available tags, see Nexus Repository tags in Docker Hub.
Upgrade with the Helm Chart
If you deploy Nexus Repository using the Helm chart, update the nexusTag property in the values.yaml file to the Docker image tag for your target Nexus Repository version.
container:
image:
repository: sonatype/nexus3
nexusTag: <version>For example:
container:
image:
repository: sonatype/nexus3
nexusTag: 3.87.0-java17For more information, see the Helm Chart documentation.
Upgrade with the Distribution Archive
Download the distribution for your target Nexus Repository version and operating system from Downloads.
The platform-specific distributions for macOS, Windows, and Linux include a Java runtime. Use the distribution appropriate for your operating system and architecture.
If you configure Nexus Repository to use an external Java runtime, install the required Java version and update your existing Java runtime configuration before upgrading Nexus Repository.