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

**URL:** <https://discourse.processing.org/t/custom-processing-library-doesnt-compile-missing-com-sun-tools-javac-main/15618>\
**Category:** Development\
**Created:** [November 18, 2019, 6:20pm UTC](https://discourse.processing.org/t/custom-processing-library-doesnt-compile-missing-com-sun-tools-javac-main/15618 "2019-11-18T18:20:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Schred](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/schred/32/13146_2.png) [@Schred](https://discourse.processing.org/u/Schred)\
**Post date:** [November 18, 2019, 6:20pm UTC](https://discourse.processing.org/t/custom-processing-library-doesnt-compile-missing-com-sun-tools-javac-main/15618/1 "2019-11-18T18:20:57Z")

</div>

I am currently following [the amazing tutorial](https://www.youtube.com/watch?v=pI2gvl9sdtE&t=821s) 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!

---

<div class="post-metadata">

**Author:** ![monkstone](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/monkstone/32/64_2.png) [@monkstone](https://discourse.processing.org/u/monkstone)\
**Post date:** [November 18, 2019, 7:25pm UTC](https://discourse.processing.org/t/custom-processing-library-doesnt-compile-missing-com-sun-tools-javac-main/15618/2 "2019-11-18T19:25:32Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Schred](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/schred/32/13146_2.png) [@Schred](https://discourse.processing.org/u/Schred)\
**Post date:** [November 18, 2019, 7:29pm UTC](https://discourse.processing.org/t/custom-processing-library-doesnt-compile-missing-com-sun-tools-javac-main/15618/3 "2019-11-18T19:29:39Z")

</div>

Yes, I do have JDK 12 installed.

---

<div class="post-metadata">

**Author:** ![Schred](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/schred/32/13146_2.png) [@Schred](https://discourse.processing.org/u/Schred)\
**Post date:** [November 18, 2019, 8:50pm UTC](https://discourse.processing.org/t/custom-processing-library-doesnt-compile-missing-com-sun-tools-javac-main/15618/4 "2019-11-18T20:50:56Z")

</div>

I figured it out based on [this](https://stackoverflow.com/questions/1288343/how-to-change-java-home-for-eclipse-ant) 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.
