# How to use Processing to open a new ped file

**URL:** <https://discourse.processing.org/t/how-to-use-processing-to-open-a-new-ped-file/9829>\
**Category:** Coding Questions\
**Created:** [April 1, 2019, 7:30am UTC](https://discourse.processing.org/t/how-to-use-processing-to-open-a-new-ped-file/9829 "2019-04-01T07:30:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![SandCrocus](https://avatars.discourse-cdn.com/v4/letter/s/eb9ed0/32.png) [@SandCrocus](https://discourse.processing.org/u/SandCrocus)\
**Post date:** [April 1, 2019, 7:30am UTC](https://discourse.processing.org/t/how-to-use-processing-to-open-a-new-ped-file/9829/1 "2019-04-01T07:30:18Z")

</div>

I want to open a specified pde file when I press the mouse. I have tried the function runtime,getruntime().exec, but it can only open an exe file. How can I open the pde file?

---

<div class="post-metadata">

**Author:** ![Stanlepunk](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/stanlepunk/32/11509_2.png) [@Stanlepunk](https://discourse.processing.org/u/Stanlepunk)\
**Post date:** [April 1, 2019, 10:17am UTC](https://discourse.processing.org/t/how-to-use-processing-to-open-a-new-ped-file/9829/2 "2019-04-01T10:17:44Z")

</div>

Can you pass a simple code to understand what you need ?  
But if you wan open a specific pde, I think the better way is compiled this one and pass by the method `launch(String path);`

---

<div class="post-metadata">

**Author:** ![SandCrocus](https://avatars.discourse-cdn.com/v4/letter/s/eb9ed0/32.png) [@SandCrocus](https://discourse.processing.org/u/SandCrocus)\
**Post date:** [April 1, 2019, 10:59am UTC](https://discourse.processing.org/t/how-to-use-processing-to-open-a-new-ped-file/9829/3 "2019-04-01T10:59:49Z")

</div>

I‘m new to Processing, I tried your way and it works! Really appreciate your help! BTW，on this basis, do you know how to pass the parameters while opening a new pde file?(I tried the way I used in JAVA and it didn’t work:( )

---

<div class="post-metadata">

**Author:** ![Stanlepunk](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/stanlepunk/32/11509_2.png) [@Stanlepunk](https://discourse.processing.org/u/Stanlepunk)\
**Post date:** [April 1, 2019, 11:13am UTC](https://discourse.processing.org/t/how-to-use-processing-to-open-a-new-ped-file/9829/4 "2019-04-01T11:13:51Z")

</div>

> [@SandCrocus](#):
>
> do you know how to pass the parameters while opening a new pde file?

Sorry id’on’t understand what you want, can you pass your code ?

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [April 2, 2019, 5:04pm UTC](https://discourse.processing.org/t/how-to-use-processing-to-open-a-new-ped-file/9829/5 "2019-04-02T17:04:38Z")

</div>

> [@SandCrocus](#):
>
> how to pass the parameters while opening a new pde file

One way is to install the command line tools (`processing-java`) and then, from your launching sketch, pass it command line arguments.

- [Command Line · processing/processing Wiki · GitHub](https://github.com/processing/processing/wiki/Command-Line)

You then interpret those command-line arguments in the new sketch. Previous related discussions:

- [How to use arguments with an application built with processing ? - Processing 2.x and 3.x Forum](https://forum.processing.org/two/discussion/6457/how-to-use-arguments-with-an-application-built-with-processing)
- [Processing Command Line - Processing 2.x and 3.x Forum](https://forum.processing.org/two/discussion/316/processing-command-line)
- [Use command line instructions in sketch - Processing 2.x and 3.x Forum](https://forum.processing.org/two/discussion/23085/use-command-line-instructions-in-sketch)
- [handling command line arguments in a sketch - Processing 2.x and 3.x Forum](https://forum.processing.org/two/discussion/23924/handling-command-line-arguments-in-a-sketch)
