Skip to content

Java 25#706

Merged
tonihele merged 4 commits into
jMonkeyEngine:masterfrom
tonihele:feature/java-25
Jun 16, 2026
Merged

Java 25#706
tonihele merged 4 commits into
jMonkeyEngine:masterfrom
tonihele:feature/java-25

Conversation

@tonihele

@tonihele tonihele commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Download and use Java 25 for everything. Resolves #692

Copilot AI review requested due to automatic review settings June 14, 2026 08:29

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request attempts to upgrade the project's Java version from JDK 21 to JDK 25 across GitHub Actions workflows, build scripts, Gradle templates, and NetBeans project properties. However, several critical issues were identified: JDK 25 is not yet released, which will cause GitHub Actions and the JDK download script to fail; Android development tools and Gradle 8.6 do not support Java 25; and setting the default compiler source/target to 25 is premature and will result in compilation errors across all modules. It is recommended to revert these changes back to JDK 21.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +18 to +21
- name: Set up JDK 25 # NBPackage requires JDK
uses: actions/setup-java@v5
with:
java-version: '21'
java-version: '25'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

The actions/setup-java action with the temurin distribution will fail to resolve Java version 25 because it has not been released yet. This will break the GitHub Actions workflow.

    - name: Set up JDK 21 # NBPackage requires JDK
      uses: actions/setup-java@v5
      with:
        java-version: '21'

Comment on lines +17 to +20
- name: Set up JDK 25
uses: actions/setup-java@v5
with:
java-version: '21'
java-version: '25'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

The actions/setup-java action with the temurin distribution will fail to resolve Java version 25 because it has not been released yet. This will break the GitHub Actions workflow.

    - name: Set up JDK 21
      uses: actions/setup-java@v5
      with:
        java-version: '21'

set -e # Quit on Error

jdk_major_version="21"
jdk_major_version="25"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

JDK 25 is not yet released as a General Availability (GA) version. The Adoptium API endpoint used on line 25 (/v3/binary/latest/$jdk_major_version/ga/...) will return a 404 error because no GA release exists for JDK 25. Since set -e is enabled, this will cause the script to fail immediately during the build process.

Suggested change
jdk_major_version="25"
jdk_major_version="21"

#Updated by build script
#Thu, 25 Aug 2011 21:00:54 +0200
javac.source=21
javac.source=25

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Android development tools and the Android Gradle Plugin do not support Java 25. Setting javac.source to 25 for the Android module will cause compilation and compatibility issues, as Android currently supports up to Java 17/21 depending on the AGP version.

javac.source=21

java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
languageVersion = JavaLanguageVersion.of(25)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Gradle 8.6 (configured in the wrapper at line 64) does not support Java 25. Gradle 8.6 only supports up to Java 21 officially. Attempting to use a Java 25 toolchain with this Gradle version will result in a configuration or build failure.

Suggested change
languageVersion = JavaLanguageVersion.of(25)
languageVersion = JavaLanguageVersion.of(21)

Comment on lines +132 to +133
default.javac.source=25
default.javac.target=25

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Setting the default Java source and target to 25 is premature as JDK 25 is not yet released or supported by the current NetBeans platform and build tools. This will cause compilation errors across all modules.

default.javac.source=21
default.javac.target=21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the SDK build configuration to standardize on Java 25 across NetBeans/Ant projects, generated Gradle templates, CI composite actions, and the installer JDK download script.

Changes:

  • Bump NetBeans javac.source / javac.target (and platform defaults) from 21 to 25 across modules/templates.
  • Update Gradle template toolchains to JavaLanguageVersion.of(25).
  • Switch CI setup-java steps and the JDK download script to Java 25.

Reviewed changes

Copilot reviewed 45 out of 45 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
nbproject/platform.properties Set default NetBeans platform javac source/target to 25.
JME3TestsTemplate/nbproject/project.properties Bump template javac.source/target to 25.
jme3-welcome-screen/nbproject/project.properties Bump module javac.source to 25.
jme3-wavefront/nbproject/project.properties Bump module javac.source to 25.
jme3-wavefront/nbproject/platform.properties Set module platform default javac source/target to 25.
jme3-vehicle-creator/nbproject/project.properties Bump module javac.source to 25.
jme3-texture-editor/nbproject/project.properties Bump module javac.source to 25.
jme3-tests-template/nbproject/project.properties Bump module javac.source to 25.
jme3-terrain-editor/nbproject/project.properties Bump module javac.source to 25.
jme3-templates/src/com/jme3/gde/templates/rollingthemonkey/build.gradle.ftl Update template Gradle toolchain to Java 25.
jme3-templates/src/com/jme3/gde/templates/monkeyzone/build.gradle.ftl Update template Gradle toolchain to Java 25.
jme3-templates/src/com/jme3/gde/templates/jaimesascent/build.gradle.ftl Update template Gradle toolchain to Java 25.
jme3-templates/src/com/jme3/gde/templates/files/freemarker/build.gradle.ftl Update template Gradle toolchain to Java 25.
jme3-templates/nbproject/project.properties Bump module javac.source to 25.
jme3-scenecomposer/nbproject/project.properties Bump module javac.source to 25.
jme3-project-testdata/nbproject/project.properties Bump module javac.source to 25.
jme3-project-libraries/nbproject/project.properties Bump module javac.source to 25.
jme3-project-baselibs/nbproject/project.properties Bump module javac.source to 25.
jme3-obfuscate/nbproject/project.properties Bump module javac.source to 25.
jme3-navmesh-gen/nbproject/project.properties Bump module javac.source to 25.
jme3-model-importer/nbproject/project.properties Bump module javac.source to 25.
jme3-materialeditor/nbproject/project.properties Bump module javac.source to 25.
jme3-lwjgl-applet/nbproject/project.properties Bump module javac.source to 25.
jme3-gui/nbproject/project.properties Bump module javac.source to 25.
jme3-glsl-highlighter/nbproject/project.properties Bump module javac.source to 25.
jme3-documentation/nbproject/project.properties Bump module javac.source to 25.
jme3-desktop-executables/nbproject/project.properties Bump module javac.source to 25.
jme3-dark-laf/nbproject/project.properties Bump module javac.source to 25.
jme3-core/nbproject/project.properties Bump module javac.source to 25.
jme3-core-updatecenters/nbproject/project.properties Bump module javac.source to 25.
jme3-core-libraries/nbproject/project.properties Bump module javac.source to 25.
jme3-core-baselibs/nbproject/project.properties Bump module javac.source to 25.
jme3-codepalette/nbproject/project.properties Bump module javac.source to 25.
jme3-code-check/nbproject/project.properties Bump module javac.source to 25.
jme3-cinematics/nbproject/project.properties Bump module javac.source to 25.
jme3-autodesk/nbproject/project.properties Bump module javac.source to 25.
jme3-autodesk/nbproject/platform.properties Set module platform default javac source/target to 25.
jme3-assetpack-support/nbproject/project.properties Bump module javac.source to 25.
jme3-assetbrowser/nbproject/project.properties Bump module javac.source to 25.
jme3-angelfont/nbproject/project.properties Bump module javac.source to 25.
jme3-android/nbproject/project.properties Bump module javac.source to 25.
installers/download-jdks.sh Download Adoptium/Temurin JDK 25 instead of 21.
BasicGameTemplate/nbproject/project.properties Bump template javac.source/target to 25.
.github/actions/build-sdk/action.yml Use JDK 25 in the SDK build composite action.
.github/actions/build-installers/action.yml Use JDK 25 in the installers build composite action.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +17 to +20
- name: Set up JDK 25
uses: actions/setup-java@v5
with:
java-version: '21'
java-version: '25'
@tonihele

Copy link
Copy Markdown
Contributor Author

Maybe this is everything. Just that the demo projects need to be updated separately to use Java 25 and then the SDK needs to download the tagged releases of Java 25 enabled versions.

@neph1 could you make Java 25 releases of the demo projects? Otherwise they wont run.

@neph1

neph1 commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

i've updated the projects (two of them, third is from jme3-tests). i did it blindly as i don't have 25 installed myself. monkeyzone doesn't have releases, and i guess the sdk just gets the latest from master

@tonihele

Copy link
Copy Markdown
Contributor Author

i've updated the projects (two of them, third is from jme3-tests). i did it blindly as i don't have 25 installed myself. monkeyzone doesn't have releases, and i guess the sdk just gets the latest from master

Thanks, although they don't work as they include Gradle wrapper that is still 8.6 version. It needs to be updated. i.e., ./gradlew wrapper once the version is set in the build file.

@neph1

neph1 commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

ah crap. i had forgot what the layout looked like. i thought it was the git repos.

@tonihele

Copy link
Copy Markdown
Contributor Author

ah crap. i had forgot what the layout looked like. i thought it was the git repos.

No worries, I can also do the ones under jMonkeyEngine since I should have the rights to do so

@tonihele tonihele merged commit 1c2c592 into jMonkeyEngine:master Jun 16, 2026
2 checks passed
@tonihele tonihele deleted the feature/java-25 branch June 16, 2026 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update Java to 25

3 participants