I am trying to compile a java 9 module library with the GA Jdk 9 on an debian system with gradle 4.2. To do this, i just did this to replace my classpath with modulepath:
compileJava {
doFirst {
options.compilerArgs = [
'--module-path', classpath.asPath,
]
classpath = files()
}
}
I have all my dependent librarys in the classpath and they get into the modulepath and that is working fine, when i try to compile it does find all my own librarys.
The Problem is now that the project also uses javafx. In Java 8 jfxrt.jar was included in the jdk and was in the default classpath as far as i know. For Java 9 i red that it is now also modularized and included.
But when I try to compile the module, the compiler tells me that he cant find javafx modules:
.../src/module-info.java:10: error: module not found: javafx.controls
requires javafx.controls;
^
On Windows it works fine without javafx beeing in the modulepath
Jdk including javafx: http://www.oracle.com/technetwork/java/javase/downloads/jdk9-downloads-3848520.html