The following shared code in javafx.media directly references a platform-specific class, which is available at compile-time, but then is excluded from the delivered module by the build. We do this for other platform-specific classes, but they are all loaded by reflection.
See JDK-8211887 for at least one problem that this causes.