# Gradle Template for Processing 4.x with Java 17 (IntelliJ/VS Code ready)

**URL:** <https://discourse.processing.org/t/gradle-template-for-processing-4-x-with-java-17-intellij-vs-code-ready/48013>\
**Category:** Development\
**Created:** [March 3, 2026, 5:49am UTC](https://discourse.processing.org/t/gradle-template-for-processing-4-x-with-java-17-intellij-vs-code-ready/48013 "2026-03-03T05:49:06Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [May 6, 2026, 10:47pm UTC](https://discourse.processing.org/t/gradle-template-for-processing-4-x-with-java-17-intellij-vs-code-ready/48013/5 "2026-05-06T22:47:42Z")

</div>

Thanks @noah-devtech!

Cool beans! It worked as is.

I trimmed it down for my use case with VS Code and JAVA2D, P2D and P3D sketches on Windows 10 and it worked.

I only added this file to my project:

`build.gradle.kts`

```JSON
plugins {
    id("java")
    id("application")
}

repositories {
    mavenCentral()
}

java {
    toolchain {
        languageVersion.set(JavaLanguageVersion.of(17))
    }
}

val processingVersion = "4.5.3"
val joglVersion = "2.6.0"

dependencies {
    implementation("org.processing:core:$processingVersion")

    // Core JOGL Modules
    //implementation("org.jogamp.jogl:jogl:$joglVersion")
    //implementation("org.jogamp.jogl:nativewindow:$joglVersion")
    //implementation("org.jogamp.jogl:newt:$joglVersion")
    //implementation("org.jogamp.gluegen:gluegen-rt:$joglVersion")

    // Required on Windows 10 for P2D/P3D.
    // implementation("org.processing:core:$processingVersion") works for JAVA2D,
    // but P2D/P3D also need these Windows native JogAmp runtime artifacts.
    runtimeOnly("org.jogamp.jogl:jogl:$joglVersion:natives-windows-amd64")
    runtimeOnly("org.jogamp.jogl:nativewindow:$joglVersion:natives-windows-amd64")
    runtimeOnly("org.jogamp.jogl:newt:$joglVersion:natives-windows-amd64")
    runtimeOnly("org.jogamp.gluegen:gluegen-rt:$joglVersion:natives-windows-amd64")

    // Direct Windows Natives
    runtimeOnly("org.jogamp.jogl:jogl:$joglVersion:natives-windows-amd64")
    runtimeOnly("org.jogamp.jogl:nativewindow:$joglVersion:natives-windows-amd64")
    runtimeOnly("org.jogamp.jogl:newt:$joglVersion:natives-windows-amd64")
    runtimeOnly("org.jogamp.gluegen:gluegen-rt:$joglVersion:natives-windows-amd64")
}

application {
    mainClass.set("MyTest")
}

```

`:)`

---

_[View the full topic](https://discourse.processing.org/t/gradle-template-for-processing-4-x-with-java-17-intellij-vs-code-ready/48013)._
