Change Java Version - Sonatype Nexus Repository - Sonatype Community

Change Java Version

post by miq68dk on Oct 2, 2024

Hello

Have upgraded Nexus to OSS 3.7.2-01 and migrated Database to H2.

I need to change the Java Version to point to version 11.

In the following Documentation I could find anything that describe it:

https://help.sonatype.com/en/upgrading-nexus-repository-java-version.html

How to Change it.

Thanks.

post by rafal.kedziorski on Oct 2, 2024

Hi @miq68dk how the last Nexus version was using Java? System installation or have you configured it?

My Nexus installation is using the system Java version. I removed Java 8 and installed the new Java version.

post by jesqueda on Oct 2, 2024

Hello @miq68dk ,

Thanks for your post!

I want to make sure I understood your question - is the doubt around how to set Java in your machine?

If so, could you share what Operating System are you using?

post by miq68dk on Oct 3, 2024

Hello

It is Windows Server 2022 Standard.

I have upgraded to OSS 3.7.2-04 but still the JRU is on 1.8.0_332-b09.

JAVA_HOME environment variable is pointing on JR 17 on the machine running Nexus…

post by jesqueda on Oct 3, 2024

Thanks for sharing more information Mohamad.

I believe this site may help:

post by miq68dk on Oct 3, 2024

Hello Jaime

Thanks for the updates.

As my understanding it was required to run on JRE 11 or 17, when nexus was upgraded to OSS 3.7.xxx. But it look like it is not necessary?

post by miq68dk on Oct 3, 2024

Succesfully running with JR 17

post by jboss-04 on Oct 8, 2024

I did the change twice in the past two months, because the first change was to Java 11 and immediately after that Nexus started requiring Java 17. Linux version uses Java from your system - if it is your case, you need to modify the starting script (sadly Nexus is resistant to JAVA_HOME environment variable). Mac version includes Java inside of the Nexus bundle. I do not know about the Windows version but I suspect it might be the same.