# Help for creating own library (add java file to sketch)

**URL:** <https://discourse.processing.org/t/help-for-creating-own-library-add-java-file-to-sketch/7130>\
**Category:** Libraries\
**Created:** [January 3, 2019, 8:41am UTC](https://discourse.processing.org/t/help-for-creating-own-library-add-java-file-to-sketch/7130 "2019-01-03T08:41:47Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [January 3, 2019, 2:06pm UTC](https://discourse.processing.org/t/help-for-creating-own-library-add-java-file-to-sketch/7130/3 "2019-01-03T14:06:38Z")

</div>

> [@Including shared pde files across projects](https://discourse.processing.org/t/including-shared-pde-files-across-projects/1701):
>
> Honey gave me an answer to my question [How can I make an include file for my scripts - SOLVED THANKS](https://discourse.processing.org/t/how-can-i-make-an-include-file-for-my-scripts-solved-thanks/1569) which to paraphrase said stick your variables in a file called file.pde in the same directory and it is included automagically. And that works nicely BUT I want to share my variables between projects, so I thought I could just move the file up a level to the projects directory and that might work, but no I get a message variable cannot be resolved. So I hunted about looking for an answer and…

---

_[View the full topic](https://discourse.processing.org/t/help-for-creating-own-library-add-java-file-to-sketch/7130)._
