# Issue following creating-a-new-module-gradle course

**URL:** <https://forum.inductiveautomation.com/t/issue-following-creating-a-new-module-gradle-course/83973>\
**Category:** Module Development\
**Created:** [January 9, 2024, 3:16pm UTC](https://forum.inductiveautomation.com/t/issue-following-creating-a-new-module-gradle-course/83973 "2024-01-09T15:16:30Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ryan\_Heintzleman](https://avatars.discourse-cdn.com/v4/letter/r/da6949/32.png) [@Ryan\_Heintzleman](https://forum.inductiveautomation.com/u/Ryan_Heintzleman)\
**Post date:** [January 9, 2024, 3:16pm UTC](https://forum.inductiveautomation.com/t/issue-following-creating-a-new-module-gradle-course/83973/1 "2024-01-09T15:16:30Z")

</div>

Hello All,

I was just following along [Creating a New Module (Gradle) Video at Inductive University](https://www.inductiveuniversity.com/video/creating-a-new-module-gradle), trying to make a new module starting point. I didn't have an issue building the scripting-function-g module from the previous video (in IntelliJ IDEA), but when I followed from command prompt 'gradlew.bat clean build' (run as admin), it gave me this error.

As I'm pretty new to git / gradle (I don't even know where that log is? I tried running with --debug and --scan but wasn't sure what to look for), I'm not sure how to diagnosis what went wrong; so any help would be appreciated!

 ![gradlew.bat clean build issue](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/c/1c83f824ee3c06ba8750b882c516d018c73b4d72.png)

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [January 9, 2024, 5:22pm UTC](https://forum.inductiveautomation.com/t/issue-following-creating-a-new-module-gradle-course/83973/2 "2024-01-09T17:22:14Z")

</div>

"Internal compiler error" suggests just that - an internal compiler error 🙂

Try removing the `.gradle` folder in the project directory completely - it's just a cache, so it will be rebuilt the next time you `gradlew.bat build`.

---

<div class="post-metadata">

**Author:** ![Ryan\_Heintzleman](https://avatars.discourse-cdn.com/v4/letter/r/da6949/32.png) [@Ryan\_Heintzleman](https://forum.inductiveautomation.com/u/Ryan_Heintzleman)\
**Post date:** [January 9, 2024, 6:07pm UTC](https://forum.inductiveautomation.com/t/issue-following-creating-a-new-module-gradle-course/83973/3 "2024-01-09T18:07:28Z")

</div>

Followed those instructions, trying both 'clean build' and 'build' (Is clean even required if I'm starting from a fresh clone of the tools?), both still failed with the same error message.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [January 9, 2024, 6:16pm UTC](https://forum.inductiveautomation.com/t/issue-following-creating-a-new-module-gradle-course/83973/4 "2024-01-09T18:16:57Z")

</div>

Can you try with the --stacktrace option and copy the text output here?

---

<div class="post-metadata">

**Author:** ![Ryan\_Heintzleman](https://avatars.discourse-cdn.com/v4/letter/r/da6949/32.png) [@Ryan\_Heintzleman](https://forum.inductiveautomation.com/u/Ryan_Heintzleman)\
**Post date:** [January 9, 2024, 6:26pm UTC](https://forum.inductiveautomation.com/t/issue-following-creating-a-new-module-gradle-course/83973/5 "2024-01-09T18:26:05Z")

</div>

See attached. I appreciate the help!

[gradlew.bat clean build issue stacktrace.txt](https://forum.inductiveautomation.com/uploads/short-url/iDlU0Gy1QXMEFH2ZTPUU15vwWm.txt) (27.5 KB)

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [January 9, 2024, 6:27pm UTC](https://forum.inductiveautomation.com/t/issue-following-creating-a-new-module-gradle-course/83973/6 "2024-01-09T18:27:15Z")

</div>

What Gradle version are you using, and what Java version are you using?

---

<div class="post-metadata">

**Author:** ![Ryan\_Heintzleman](https://avatars.discourse-cdn.com/v4/letter/r/da6949/32.png) [@Ryan\_Heintzleman](https://forum.inductiveautomation.com/u/Ryan_Heintzleman)\
**Post date:** [January 9, 2024, 6:29pm UTC](https://forum.inductiveautomation.com/t/issue-following-creating-a-new-module-gradle-course/83973/7 "2024-01-09T18:29:45Z")

</div>

C:\Users[USER]\>gradle -v

* * *

## Gradle 8.5

Build time: 2023-11-29 14:08:57 UTC  
Revision: 28aca86a7180baa17117e0e5ba01d8ea9feca598

Kotlin: 1.9.20  
Groovy: 3.0.17  
Ant: Apache Ant(TM) version 1.10.13 compiled on January 4 2023  
JVM: 21.0.1 (Azul Systems, Inc. 21.0.1+12-LTS)  
OS: Windows 10 10.0 amd64

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [January 9, 2024, 6:30pm UTC](https://forum.inductiveautomation.com/t/issue-following-creating-a-new-module-gradle-course/83973/8 "2024-01-09T18:30:38Z")

</div>

Try using a Java 17 runtime.

---

<div class="post-metadata">

**Author:** ![Ryan\_Heintzleman](https://avatars.discourse-cdn.com/v4/letter/r/da6949/32.png) [@Ryan\_Heintzleman](https://forum.inductiveautomation.com/u/Ryan_Heintzleman)\
**Post date:** [January 9, 2024, 6:43pm UTC](https://forum.inductiveautomation.com/t/issue-following-creating-a-new-module-gradle-course/83973/9 "2024-01-09T18:43:12Z")

</div>

Can you remind me how to change where Gradle points at? I uninstalled 21 and installed 17. Both java -version and echo %JAVA\_HOME% are pointing at the correct location/version, but when I try a new build it immediately fails saying it tried the old -21\bin.

I followed the video showing how to install Java, and added it to the Java Path, but apparently there's a missing link.

---

<div class="post-metadata">

**Author:** ![Ryan\_Heintzleman](https://avatars.discourse-cdn.com/v4/letter/r/da6949/32.png) [@Ryan\_Heintzleman](https://forum.inductiveautomation.com/u/Ryan_Heintzleman)\
**Post date:** [January 9, 2024, 6:54pm UTC](https://forum.inductiveautomation.com/t/issue-following-creating-a-new-module-gradle-course/83973/10 "2024-01-09T18:54:20Z")

</div>

I went into the pointer location and removed the empty folder of -21. Apparently that's all it needed, as the build just worked no problems.

Thanks @paul-griffith!
