Closed LuciferYang closed 1 year ago
friendly ping @SethTisue for help
sun.util
package, this may be the key point.also cc @srowen @dongjoon-hyun to known, I'm doing some testing work for the Java and Scala upgrade for Spark 4.0 and encountered the above issue.
hmm... It seems that the java.base
module did not exports the sun.util.calendar
package, so it can't access the corresponding API after adding the -release
option? If that's the case, I'll close this issue, as it doesn't appear to be a bug.
See https://github.com/scala/bug/issues/12643 and https://bugs.openjdk.org/browse/JDK-8206937
When using a new JDK (like 17) with -release 11
, the classpath contains a special file (ct.sym) instead of the actual JDK jar. This file doesn't contain symbols for internal API.
duplicate of #12643. let's consolidate any discussion there
Thanks @SethTisue @lrytz
Reproduction steps
Scala version: 2.13.11, 2.13.12 Java version: 17.0.8, 21-ea
Problem
Run command with Java 17 & 21-ea
or run command with Java 21-ea
There are compilation errors:
But if the command is changed to
or
the compilation will be successful.