# IOException in ProcessBuilder.start method during compile

**URL:** <https://discourse.processing.org/t/ioexception-in-processbuilder-start-method-during-compile/25578>\
**Category:** Coding Questions\
**Created:** [November 20, 2020, 8:11pm UTC](https://discourse.processing.org/t/ioexception-in-processbuilder-start-method-during-compile/25578 "2020-11-20T20:11:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![srwlive](https://avatars.discourse-cdn.com/v4/letter/s/87869e/32.png) [@srwlive](https://discourse.processing.org/u/srwlive)\
**Post date:** [November 20, 2020, 8:11pm UTC](https://discourse.processing.org/t/ioexception-in-processbuilder-start-method-during-compile/25578/1 "2020-11-20T20:11:02Z")

</div>

```auto
Process runProgram(List<String> args) {                  
    ProcessBuilder pb = new ProcessBuilder(args);        
    return pb.start();                                   
}

```

When I try to compile and run with processing-java.exe --sketch … --run I see error when loading my code. Mind you, no execution path gets to above code during loading. Yet I still get what seems like a runtime error:

foo.pde:745:0:745:0: Unhandled exception type IOException

If I comment out pb.start() call, it compiles and loads just fine. Same IOException when using Runtime.exec instead. How do I get a runtime IOException when compiling these statements?

---

<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:** [November 20, 2020, 8:21pm UTC](https://discourse.processing.org/t/ioexception-in-processbuilder-start-method-during-compile/25578/2 "2020-11-20T20:21:50Z")

</div>

> **[try \\ Language (API) \\ Processing 3+](https://Processing.org/reference/try.html)**
