encountered problem with java compiler settings. at this point I already set JDK 21 for the project, module and in maven pom.xml - and successfully coded using the new apis. but during build attempt there were errors exclusively due to the new methods from jdk21 not being recognized (last pic in this post). then I learnt that in this case one should check language level in compiler settings and set it to the respective value (21 in my case). but it wasn't possible here((0(
java compiler settings after updating intellij to 2025 version. where I successfully set language level to the necessary value of 21.
error situation that was happening at build attempts before the fix. specifically the methods made available by the new jdk were unable to be found. despite that in code they were recognized, intellisense included them...
if you struggle to update jdk version in a java project, in particular when working with intellij - the last resort of the previous value can be language level! which in turn can be limited by the ide version! D:
(today had to upd v2022 to v2025 for jdk 21)
#java #jdk #dev #intellij #compiler