JDK-8124096 : FX cannot reliably build with recent JDK8 ea
  • Type: Bug
  • Component: javafx
  • Sub-Component: other
  • Affected Version: 8
  • Priority: P3
  • Status: Resolved
  • Resolution: Won't Fix
  • Submitted: 2013-03-22
  • Updated: 2015-06-17
  • Resolved: 2013-05-28
Related Reports
Blocks :  
Description
Because JDK8 now ships with jfxrt.jar in the jre/lib/ext directory, that file will be used in preference to classes in other jars on the classpath. This means that when building the FX runtime, we will be compiling source code from our current repository, but getting any dependent class files in  other modules from whatever version of those classes is in the installed JDK8 build being used. If there are any interface changes, we will fail to compile.
Comments
We have decided not to fix this in the ant environment. Developers should manually remove jfxrt.jar from the JDK 8 that they use to build JavaFX until we switch to gradle.
28-05-2013

I imagine the switch to gradle would be a couple of weeks after the switch to JDK8, so as long as it isn't too hard it would be good to do so we don't have a dependency (fewer moving parts). Still, you are right that the time value of this fix is somewhat limited.
03-04-2013

I'm wondering how much value there is in fixing this, if we could make the switch over to gradle at the same time we switch over to 8?
03-04-2013

The solution will be to use -Djava.ext.dirs="" when compiling all class files. This will have to be done in each repo (and possible individually in each of the toys and apps/internal projects). Workaround: remove jre/lib/ext/jfxrt.jar from the JDK8 that you use to compile against.
22-03-2013

Note also that any demos run from the FX workspace are launched using the FX from JDK8, not FX classes/binaries from artifacts. Unit tests are likely affected as well.
22-03-2013