I installed `java 25` on my system, set gradle jdk...
# intellij
u
I installed
java 25
on my system, set gradle jdk to point to it, everything builds & works however, when I open Android Studio; I'm greeted with
Copy code
You must accept the terms of legal notice of the beta Java specification to enable support for "X - Experimental features". The implementation of an early-draft specification developed under the Java Community Process (JCP) is made available for testing and evaluation purposes only and is not compatible with any specification of the JCP
Why? isnt the 25 I installed a LTS? i.e. stable?
a
X - Experimental features
Means that your AS version doesn't yet support java 25, only it's EAP builds were supported at the time AS was branched from IJ. You need a newer version of AS (if available) or use IJ 2025.2+.
u
But why does AS/IJ need to support it if gradle does the building?
a
code insight, refactorings, etc are supported separately
u
so IJ itself runs on my JAVA_HOME jvm? I though that came bundled & was not changeable
a
no, IJ runs on bundled JRE. But the message is about code insight features which are supported only in preview mode.
if you don't use java 25 language features, then you are fine and not affected by the notice
u
hmm, I though language features were set with the
jvmToolchain
a
the language version is set there but gradle doesn't insert e.g. scoped values in your code
u
so if javahome points to a jdk X, IJ just assumes that then?
a
no, the notice means that you use preview language level (at the time of releasing* of your AS/IJ) as project jdk. It's gradle which decides which jdk to set as project jdk. Again, if you don't use new language features in your code, you can ignore the notice. If you want to use the features, please upgrade.
u
okay if gradle sets the project jdk then it makes sense, I wasnt sure where it was coming from what I actually indended to do was to drive gradle building itself with the latest jvm, since there is supposedly perf gains (seeking build perf gains) and its trivial to just swap it I wasnt indending to modify my app in any way
I must have messed with something else as well thank you for your help!
(nevermind its 21 now; it's just to show where I switched gradle to 25; i.e. if im doing it right?)
👌 1
345 Views