Custom Processing library doesn't compile (Missing "com.sun.tools.javac.Main")

I am currently following the amazing tutorial by Daniel Shiffman on how to create a library for Processing.
I got everything setup and ready to compile, however, I got this error message:

BUILD FAILED
ProjectPath\resources\build.xml:107: The following error occurred while executing this line:
ProjectPath\resources\build.xml:141: Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK.
It is currently set to “C:\Program Files\Java\jre1.8.0_231”

I have previously never had that error when working with Eclipse, so I’m kind of stuck on what to do here. Maybe add the mentiontend Main class to the classpath? But does Processing really rely on com.sun packages? Maybe that’s just a normal thing every application does and I’m just not aware of.
Anyways, thank you for your responses in advance!

1 Like

Have you installed a jdk (needed to provide javac)? Eclipse I believe has its own compiler.

1 Like

Yes, I do have JDK 12 installed.

I figured it out based on this post.
Im my case, I had to click on External Tools Configurations after (right-) clicking on the library in the Ant window and hovering over Run As, go to the JRE tab and set Seperate JRE to my JDK.

2 Likes