diff --git a/website/www/site/content/en/get-started/quickstart-java.md b/website/www/site/content/en/get-started/quickstart-java.md index b3ff77174e0b..46c687b54236 100644 --- a/website/www/site/content/en/get-started/quickstart-java.md +++ b/website/www/site/content/en/get-started/quickstart-java.md @@ -139,9 +139,9 @@ if (project.hasProperty("dataflow-runner")) { {{< /highlight >}} 4. At the end of the build script, add the following task: {{< highlight >}} -task execute (type: JavaExec) { - classpath = sourceSets["main"].runtimeClasspath - mainClass.set(System.getProperty("mainClass")) +tasks.register("execute") { + mainClass.set(System.getProperty("mainClass")) + classpath = sourceSets.main.get().runtimeClasspath } {{< /highlight >}} 4. Build your project: