List.of() should be Java 17, but why is the symbol...
# community-support
o
List.of() should be Java 17, but why is the symbol not found at gradle build - gradle 9 is JDK17+?! Compiling with toolchain 'C:\Users\koppor\.jdks\corretto-17.0.2'. Compiling with JDK Java compiler API. C\git repositories\gradle\subprojects\core\src\main\java\org\gradle\process\internal\JavaExecHandleBuilder.java435: error: cannot find symbol return List.of("@" + argsFile.getAbsolutePath()); ^ symbol: method of(String) location: interface List 1 error Maybe I am reading https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html#of() wrong?!
🧵 1
v
Please do not split topics across several threads. This makes following the conversation in the threads view very hard as the context of the other messages is missing. If you have additional information either edit the original message or post to its thread. Regarding the question, no you do read it correctly. But I guess that class is still compiled with target Java 8. Workers may still run on Java 8 and thus also everything that might be needed there must stay Java 8 compatible even if running Gradle itself has Java 17 as minimum requirement now.
👍 1