# Can a Tool access Preferences?

**URL:** <https://discourse.processing.org/t/can-a-tool-access-preferences/5506>\
**Category:** Development\
**Created:** [November 13, 2018, 6:49pm UTC](https://discourse.processing.org/t/can-a-tool-access-preferences/5506 "2018-11-13T18:49:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hamoid](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/hamoid/32/58_2.png) [@hamoid](https://discourse.processing.org/u/hamoid)\
**Post date:** [November 13, 2018, 6:49pm UTC](https://discourse.processing.org/t/can-a-tool-access-preferences/5506/1 "2018-11-13T18:49:17Z")

</div>

[This page](https://github.com/processing/processing/wiki/Tool-Basics#what-tools-can-and-cannot-do) about developing a tool mentions

> ## What Tools Can and Cannot Do
> 
> The following classes have been sufficiently documented for use in `Tool` classes:
> 
> [`processing.app.Base`](https://github.com/processing/processing/blob/master/app/src/processing/app/Base.java)
> 
> The base class for the main Processing application.
> 
> [`processing.app.ui.Editor`](https://github.com/processing/processing/blob/master/app/src/processing/app/ui/Editor.java)
> 
> Main editor panel for the Processing Development Environment.
> 
> [`processing.app.Preferences`](https://github.com/processing/processing/blob/master/app/src/processing/app/Preferences.java)
> 
> Storage class for user preferences and environment settings.
> 
> [`processing.app.Sketch`](https://github.com/processing/processing/blob/master/app/src/processing/app/Sketch.java)
> 
> Stores information about files in the current sketch
> 
> [`processing.app.SketchCode`](https://github.com/processing/processing/blob/master/app/src/processing/app/SketchCode.java)
> 
> Represents a single tab of a sketch.

but includes no further details. So what would be the approach to access Preferences? I would like my tool to have a few settings. I also developed the Video Export library and remember struggling a lot finding a place where to store settings. First I used a generic Java approach, but then I was surprised to find out it was failing under Windows, so I hacked a way to figure out the library location and write a json file there. It would be nice if there was a preferences getter/setter provided by the IDE. Is there one?

---

<div class="post-metadata">

**Author:** ![hamoid](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/hamoid/32/58_2.png) [@hamoid](https://discourse.processing.org/u/hamoid)\
**Post date:** [November 13, 2018, 6:53pm UTC](https://discourse.processing.org/t/can-a-tool-access-preferences/5506/2 "2018-11-13T18:53:17Z")

</div>

Meh… forget my question. The answer is too simple 🙂

Nothing like asking to figure out the answer yourself.

So it turns out everything in Preferences is static. So I can just

```auto
Preferences.get("bla"); 

```

from the Tool.
