# Change Java Version

**URL:** <https://community.sonatype.com/t/change-java-version/13581>\
**Category:** Sonatype Nexus Repository\
**Tags:** nexus-repository\
**Created:** [October 2, 2024, 11:42am UTC](https://community.sonatype.com/t/change-java-version/13581 "2024-10-02T11:42:48Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![miq68dk](https://avatars.discourse-cdn.com/v4/letter/m/ed655f/32.png) [@miq68dk](https://community.sonatype.com/u/miq68dk)\
**Post date:** [October 2, 2024, 11:42am UTC](https://community.sonatype.com/t/change-java-version/13581/1 "2024-10-02T11:42:48Z")

</div>

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](https://help.sonatype.com/en/upgrading-nexus-repository-java-version.html)

How to Change it.

Thanks.

---

<div class="post-metadata">

**Author:** ![rafal.kedziorski](https://yyz1.discourse-cdn.com/flex047/user_avatar/community.sonatype.com/rafal.kedziorski/32/2056_2.png) [@rafal.kedziorski](https://community.sonatype.com/u/rafal.kedziorski)\
**Post date:** [October 2, 2024, 2:54pm UTC](https://community.sonatype.com/t/change-java-version/13581/2 "2024-10-02T14:54:10Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jesqueda](https://avatars.discourse-cdn.com/v4/letter/j/cab0a1/32.png) [@jesqueda](https://community.sonatype.com/u/jesqueda)\
**Post date:** [October 2, 2024, 3:12pm UTC](https://community.sonatype.com/t/change-java-version/13581/3 "2024-10-02T15:12:20Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![miq68dk](https://avatars.discourse-cdn.com/v4/letter/m/ed655f/32.png) [@miq68dk](https://community.sonatype.com/u/miq68dk)\
**Post date:** [October 3, 2024, 5:54am UTC](https://community.sonatype.com/t/change-java-version/13581/4 "2024-10-03T05:54:11Z")

</div>

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..

 ![image](https://canada1.discourse-cdn.com/flex047/uploads/communitysonatype/original/2X/0/0891262000eb89a3ab92b78dafa8671c8d1181a2.png)

---

<div class="post-metadata">

**Author:** ![jesqueda](https://avatars.discourse-cdn.com/v4/letter/j/cab0a1/32.png) [@jesqueda](https://community.sonatype.com/u/jesqueda)\
**Post date:** [October 3, 2024, 7:54am UTC](https://community.sonatype.com/t/change-java-version/13581/5 "2024-10-03T07:54:53Z")

</div>

Thanks for sharing more information Mohamad.

I believe this site may help:

> **[Updating Java Version Used for Nexus Repository 3 on Windows](https://support.sonatype.com/hc/en-us/articles/360009612173-Updating-Java-Version-Used-for-Nexus-Repository-3-on-Windows)**
>
> Nexus Repository Manager 3 on Windows bundles its own JRE. If you want to update to a different version of Java you will need to override the version shipped with Nexus.
> You can do that as follows:...

---

<div class="post-metadata">

**Author:** ![miq68dk](https://avatars.discourse-cdn.com/v4/letter/m/ed655f/32.png) [@miq68dk](https://community.sonatype.com/u/miq68dk)\
**Post date:** [October 3, 2024, 8:29am UTC](https://community.sonatype.com/t/change-java-version/13581/7 "2024-10-03T08:29:32Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![miq68dk](https://avatars.discourse-cdn.com/v4/letter/m/ed655f/32.png) [@miq68dk](https://community.sonatype.com/u/miq68dk)\
**Post date:** [October 3, 2024, 8:40am UTC](https://community.sonatype.com/t/change-java-version/13581/8 "2024-10-03T08:40:44Z")

</div>

Succesfully running with JR 17

---

<div class="post-metadata">

**Author:** ![jboss-04](https://yyz1.discourse-cdn.com/flex047/user_avatar/community.sonatype.com/jboss-04/32/985_2.png) [@jboss-04](https://community.sonatype.com/u/jboss-04)\
**Post date:** [October 8, 2024, 12:54pm UTC](https://community.sonatype.com/t/change-java-version/13581/9 "2024-10-08T12:54:03Z")

</div>

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.
