# The processing-java.exe cannot handle a sketch path containing spaces

**URL:** <https://discourse.processing.org/t/the-processing-java-exe-cannot-handle-a-sketch-path-containing-spaces/46451>\
**Category:** Processing\
**Created:** [May 25, 2025, 3:42pm UTC](https://discourse.processing.org/t/the-processing-java-exe-cannot-handle-a-sketch-path-containing-spaces/46451 "2025-05-25T15:42:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Philip\_Sharman](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/philip_sharman/32/20115_2.png) [@Philip\_Sharman](https://discourse.processing.org/u/Philip_Sharman)\
**Post date:** [May 25, 2025, 3:42pm UTC](https://discourse.processing.org/t/the-processing-java-exe-cannot-handle-a-sketch-path-containing-spaces/46451/1 "2025-05-25T15:42:14Z")

</div>

According to my notes, this used to work:  
`processing-java --sketch='/Users/philip/Test B'`

But now it gives the error `Error: got unexpected extra argument (B)`.

I’ve tried escaping the spaces, like this  
`processing-java --sketch='/Users/philip/Test\ B' `  
but I get the same error.

Is there any way around this? Thanks!

---

<div class="post-metadata">

**Author:** ![quark](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/quark/32/26_2.png) [@quark](https://discourse.processing.org/u/quark)\
**Post date:** [May 25, 2025, 4:31pm UTC](https://discourse.processing.org/t/the-processing-java-exe-cannot-handle-a-sketch-path-containing-spaces/46451/2 "2025-05-25T16:31:43Z")

</div>

> [@Philip\_Sharman](#):
>
> processing-java --sketch=‘/Users/philip/Test\ B’

This is a guess but you might try :-

`processing-java --sketch='/Users/philip/Test%20B' `

---

<div class="post-metadata">

**Author:** ![Philip\_Sharman](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/philip_sharman/32/20115_2.png) [@Philip\_Sharman](https://discourse.processing.org/u/Philip_Sharman)\
**Post date:** [May 25, 2025, 5:18pm UTC](https://discourse.processing.org/t/the-processing-java-exe-cannot-handle-a-sketch-path-containing-spaces/46451/3 "2025-05-25T17:18:50Z")

</div>

Thanks for the suggestion, but I’m afraid that doesn’t work either.

---

<div class="post-metadata">

**Author:** ![quark](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/quark/32/26_2.png) [@quark](https://discourse.processing.org/u/quark)\
**Post date:** [May 25, 2025, 5:45pm UTC](https://discourse.processing.org/t/the-processing-java-exe-cannot-handle-a-sketch-path-containing-spaces/46451/4 "2025-05-25T17:45:53Z")

</div>

When you save a sketch with a space in the name e.g. `Test B` Processing (4.4.4) replaces the space with an underscore so try

`processing-java --sketch='/Users/philip/Test_B' `

---

<div class="post-metadata">

**Author:** ![Philip\_Sharman](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/philip_sharman/32/20115_2.png) [@Philip\_Sharman](https://discourse.processing.org/u/Philip_Sharman)\
**Post date:** [May 26, 2025, 12:09am UTC](https://discourse.processing.org/t/the-processing-java-exe-cannot-handle-a-sketch-path-containing-spaces/46451/5 "2025-05-26T00:09:41Z")

</div>

Oops, I made a mistake in my example. The problem occurs if the path to the sketch include a folder with spaces in the name. EG

```auto
processing-java --sketch="/Users/philip/More Sketches/Test_B" --run

```

gives

```auto
Error: got unexpected extra argument (Sketches/Test_B)

```
