In order to be able to compile FX modules as modules (see JDK-8161704), we need to rename the directories under the modules/ directory to exactly match the module names. This is required by javac. In addition we need to move any directory under modules that isn't really a module (e.g., the "extensions" directory).
The following renaming, at a minimum, is needed:
base --> javafx.base
controls --> javafx.controls
fxml --> javafx.fxml
fxpackager --> jdk.packager
fxpackagerservices --> jdk.packager.services
graphics --> javafx.graphics
jmx --> javafx.jmx
media --> javafx.media
swing --> javafx.swing
swt --> javafx.swt
web --> javafx.web