# Processing can find the data folder in Windows 11 but not in Linux or Mac

**URL:** <https://discourse.processing.org/t/processing-can-find-the-data-folder-in-windows-11-but-not-in-linux-or-mac/47472>\
**Category:** Coding Questions\
**Tags:** homework\
**Created:** [November 2, 2025, 8:48pm UTC](https://discourse.processing.org/t/processing-can-find-the-data-folder-in-windows-11-but-not-in-linux-or-mac/47472 "2025-11-02T20:48:54Z")\
**Posts on this page:** 1\
**Showing post:** 27

<div class="post-metadata">

**Author:** ![svan](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@svan](https://discourse.processing.org/u/svan)\
**Post date:** [November 4, 2025, 4:20pm UTC](https://discourse.processing.org/t/processing-can-find-the-data-folder-in-windows-11-but-not-in-linux-or-mac/47472/27 "2025-11-04T16:20:11Z")

</div>

If you’re going to stick an “=“ sign in there why not just use:

```processing
PApplet.runSketch(new String[]{ sketchPath(), "" },this);

```

That works too on my mac.

It’s expecting the name of the class that extends PApplet and that’s what `this.getClass().getSimpleName()` does. If the name of your class is “TestWindow“ and you use

```processing
 PApplet.runSketch(new String[]{"TestWindow"},this);

```

that will work too (on a mac, not tested on other platforms).

Actually you can get by with only this:

```processing
PApplet.runSketch(new String[]{""},this);

```

_In summary, using sketchPath() in a PApplet returns only a forwardslash on my system and is worthless. I’m sticking with my last snippet unless someone has a compelling reason to change._

If you want to confirm my findings here is a test app that you may run:

```processing
class TestWindow extends PApplet {
  TestWindow () {
  PApplet.runSketch(new String[]{""},this);
  }

  void settings() {
    size(200, 200);
  }

  void setup() {
    background(106);
    println("className = ",this.getClass().getSimpleName() );
    println("ARGS_SKETCH_FOLDER =",ARGS_SKETCH_FOLDER);
    println("sketchPath = ",sketchPath());   
    printArray(new String[]{ ARGS_SKETCH_FOLDER + sketchPath(), ""});
    println("dataPath = ",dataPath(""));
  }
}

TestWindow testWindow;

void setup() {
  surface.setVisible(false);
  testWindow = new TestWindow();
}

```

**Mac Output:**

 ![dp](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/9/e/9e43dd49f0f6a7bd51d6081f233caaf6cf9d2eec.png)

**Note that dataPath() doesn’t work inside of a PApplet either which is why the OP’s Mac friend couldn’t use loadImage() as expected.**

---

_[View the full topic](https://discourse.processing.org/t/processing-can-find-the-data-folder-in-windows-11-but-not-in-linux-or-mac/47472)._
