Gradle for Java 11 with Modules
问题 I'm trying to run a sample JavaFX app on Mac OS. build.gradle apply plugin: 'java' apply plugin: 'application' repositories { mavenCentral() } dependencies { compile "org.openjfx:javafx-base:11" compile "org.openjfx:javafx-graphics:11" compile "org.openjfx:javafx-controls:11" } compileJava { doFirst { println "CLASSPATH IS $classpath.asPath" options.compilerArgs = [ '--module-path', classpath.asPath, '--add-modules', 'javafx.graphics' ] classpath = files() } } Java class package com.test;