Skip to content

Conversation

@svillar
Copy link
Member

@svillar svillar commented Sep 2, 2025

Generating Java 1.8 compatible code has been deprecated in Java 21. To be prepared for the future we can set the minimum requirement of Java 17 which has been available in long term support versions of the most common Linux distributions for a while. The other option would be to increase the source and target compatibility as 1.8 is rather old, but the safest (and recommended) approach is to set a toolchain compatible with 1.8 code generation.

This fixes this warning in the build:
'''
Task :app:compileOculusvrArm64GeckoGenericDebugJavaWithJavac Java compiler version 21 has deprecated support for compiling with source/target version 8.
Try one of the following options:

  1. [Recommended] Use Java toolchain with a lower language version
  2. Set a higher source/target version
  3. Use a lower version of the JDK running the build (if you're not using Java toolchain)
    '''

Generating Java 1.8 compatible code has been deprecated in Java 21.
To be prepared for the future we can set the minimum requirement
of Java 17 which has been available in long term support versions
of the most common Linux distributions for a while. The other option
would be to increase the source and target compatibility as 1.8 is
rather old, but the safest (and recommended) approach is to set
a toolchain compatible with 1.8 code generation.

This fixes this warning in the build:
'''
Task :app:compileOculusvrArm64GeckoGenericDebugJavaWithJavac Java
compiler version 21 has deprecated support for compiling with
source/target version 8.
Try one of the following options:
1. [Recommended] Use Java toolchain with a lower language version
2. Set a higher source/target version
3. Use a lower version of the JDK running the build (if you're
not using Java toolchain)
'''
@svillar svillar merged commit 6a4a67b into main Sep 2, 2025
22 checks passed
@svillar svillar deleted the java_toolchain branch September 2, 2025 14:13
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.

3 participants