You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cross-compiling on a different JDK than the one used to run scalac is hindered by the fact that -javaextirs is always picking up the jars found in the running JDK.
For example, running Java 7, and compiling using JDK8
Notice the JDK 7 entries. Passing -javaextdirs "" won't have any effect.
This scenario is used in the IDE, where users configure the JDK per project, and probably JDK 8 is a prime example. Mixing JDK7 and JDK8 on the classpath crashes scalac with MissingRequirementError @FunctionalInterface not found (since rt.jar comes from Java 7, but a JavaFX class would come from extdirs, meaning the JDK8 version, version that might use the new FunctionalInterface).
The PathResolver hardcodes the idea that an empty string means it should pick up the default value.
Workaround: use a whitespace character -javaextdirs " "
The text was updated successfully, but these errors were encountered:
Cross-compiling on a different JDK than the one used to run scalac is hindered by the fact that -javaextirs is always picking up the jars found in the running JDK.
For example, running Java 7, and compiling using JDK8
Notice the JDK 7 entries. Passing
-javaextdirs ""
won't have any effect.This scenario is used in the IDE, where users configure the JDK per project, and probably JDK 8 is a prime example. Mixing JDK7 and JDK8 on the classpath crashes scalac with MissingRequirementError @FunctionalInterface not found (since rt.jar comes from Java 7, but a JavaFX class would come from extdirs, meaning the JDK8 version, version that might use the new FunctionalInterface).
The
PathResolver
hardcodes the idea that an empty string means it should pick up the default value.Workaround: use a whitespace character
-javaextdirs " "
The text was updated successfully, but these errors were encountered: