# Passing preferences as arguments to java-processing

**URL:** <https://discourse.processing.org/t/passing-preferences-as-arguments-to-java-processing/13916>\
**Category:** Processing\
**Created:** [September 10, 2019, 6:22pm UTC](https://discourse.processing.org/t/passing-preferences-as-arguments-to-java-processing/13916 "2019-09-10T18:22:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jvolker](https://avatars.discourse-cdn.com/v4/letter/j/f0a364/32.png) [@jvolker](https://discourse.processing.org/u/jvolker)\
**Post date:** [September 10, 2019, 6:22pm UTC](https://discourse.processing.org/t/passing-preferences-as-arguments-to-java-processing/13916/1 "2019-09-10T18:22:32Z")

</div>

I’m looking for a way to pass

```auto
run.present.bgcolor=#666666
run.present.stop.color=#cccccc

```

as arguments to `processing-java` CLI.

Is the only way to change them in `preferences.txt` or are there ways to pass them on the command line?

Thanks.

---

<div class="post-metadata">

**Author:** ![jvolker](https://avatars.discourse-cdn.com/v4/letter/j/f0a364/32.png) [@jvolker](https://discourse.processing.org/u/jvolker)\
**Post date:** [September 11, 2019, 8:39pm UTC](https://discourse.processing.org/t/passing-preferences-as-arguments-to-java-processing/13916/2 "2019-09-11T20:39:59Z")

</div>

Maybe a look at the source code of the processing-java CLI might help.

It’s difficult to find it though, as the project is so large. Could anyone please point me to the source file on Github? Thanks.

---

<div class="post-metadata">

**Author:** ![jvolker](https://avatars.discourse-cdn.com/v4/letter/j/f0a364/32.png) [@jvolker](https://discourse.processing.org/u/jvolker)\
**Post date:** [September 12, 2019, 2:22pm UTC](https://discourse.processing.org/t/passing-preferences-as-arguments-to-java-processing/13916/3 "2019-09-12T14:22:48Z")

</div>

I found the source. It’s here: [processing/java/src/processing/mode/java/Commander.java at master · processing/processing · GitHub](https://github.com/processing/processing/blob/master/java/src/processing/mode/java/Commander.java)

It seems like there is/was a `--preferences=` argument planned that allows to

> pass in a prefs path if that was specified

but the code is commented out. At least, for now, it doesn’t seem like there is any other option other than modifying `preferences.txt` directly. I think it would be a good option though. In my case, I don’t like to make these changes permanently.

---

<div class="post-metadata">

**Author:** ![jvolker](https://avatars.discourse-cdn.com/v4/letter/j/f0a364/32.png) [@jvolker](https://discourse.processing.org/u/jvolker)\
**Post date:** [September 21, 2019, 11:47am UTC](https://discourse.processing.org/t/passing-preferences-as-arguments-to-java-processing/13916/4 "2019-09-21T11:47:05Z")

</div>

I’ve requested support here: [https://github.com/processing/processing/issues/5921](https://github.com/processing/processing/issues/5921)
