# Can we run processing code by clicking on a icon like a desktop applications

**URL:** https://discourse.processing.org/t/can-we-run-processing-code-by-clicking-on-a-icon-like-a-desktop-applications/16515
**Category:** Processing
**Created:** [December 19, 2019, 4:03pm UTC](https://discourse.processing.org/t/can-we-run-processing-code-by-clicking-on-a-icon-like-a-desktop-applications/16515 "2019-12-19T16:03:51Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![iamgsshetty](https://avatars.discourse-cdn.com/v4/letter/i/ecae2f/32.png) [@iamgsshetty](https://discourse.processing.org/u/iamgsshetty)
#### Post date: [December 19, 2019, 4:03pm UTC](https://discourse.processing.org/t/can-we-run-processing-code-by-clicking-on-a-icon-like-a-desktop-applications/16515/1 "2019-12-19T16:03:51Z")

</div>

can we run processing code by clicking on a icon like a desktop applications

---

<div class="post-metadata">

### Author: ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)
#### Post date: [December 19, 2019, 4:48pm UTC](https://discourse.processing.org/t/can-we-run-processing-code-by-clicking-on-a-icon-like-a-desktop-applications/16515/2 "2019-12-19T16:48:54Z")

</div>

you could make a command file using

- walk ( cd ) to the sketch path
- start processing and sketch using

```auto
cd /.../
/.../processing-java --sketch=my_sketch.pde --run

```

> **[processing/processing](https://github.com/processing/processing/wiki/Command-Line)**
>
> Source code for the Processing Core and Development Environment (PDE) - processing/processing

must use full path…

* * *

but other way windows is  
explorer, go to the sketch  
right click context menu:  
send to desktop ( create shortcut )

find new icon  
double click  
(PDE should start automatically and open that sketch ( but NOT RUN it ) )

---

<div class="post-metadata">

### Author: ![iamgsshetty](https://avatars.discourse-cdn.com/v4/letter/i/ecae2f/32.png) [@iamgsshetty](https://discourse.processing.org/u/iamgsshetty)
#### Post date: [December 19, 2019, 5:19pm UTC](https://discourse.processing.org/t/can-we-run-processing-code-by-clicking-on-a-icon-like-a-desktop-applications/16515/3 "2019-12-19T17:19:53Z")

</div>

C:\Users\COMP\_1\Processing\>processing-java --sketch=test.pde --run  
‘processing-java’ is not recognized as an internal or external command,  
operable program or batch file.

showing this error although I included processing to my path

---

<div class="post-metadata">

### Author: ![Lexyth](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/lexyth/32/7403_2.png) [@Lexyth](https://discourse.processing.org/u/Lexyth)
#### Post date: [December 19, 2019, 5:42pm UTC](https://discourse.processing.org/t/can-we-run-processing-code-by-clicking-on-a-icon-like-a-desktop-applications/16515/4 "2019-12-19T17:42:17Z")

</div>

I think what you are looking for is to export an application. You can just Click on it like any other exe. I don‘t have the IDE accessable right now, but i‘m pretty sure that if you open the sketch, under the leftmost tab in the menu, you can find a Text called Export. Then just Click it and select if you want to export it with/out extra java included (for mac/linux i think).

---

<div class="post-metadata">

### Author: ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)
#### Post date: [December 20, 2019, 12:39am UTC](https://discourse.processing.org/t/can-we-run-processing-code-by-clicking-on-a-icon-like-a-desktop-applications/16515/5 "2019-12-20T00:39:14Z")

</div>

> [@iamgsshetty](#):
>
> processing-java

processing-java.exe is not in your sketch path, it is in your install ( unzip ) path  
best is use **full path** , for the program and the sketch.

example here have processing ( unzip ) and sketchbook on a other drive:

 ![processing_command_line_start_bat](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/3/3d79c04018266e0444ccfb0211cb84fb25bc91e6.png)

pls see that you not use the filename  
test.pde,  
only the path

( as usual processing expects that under that path …/test/ is a …/test/test.pde )

also know that this works for any .pde, must not be under the preferences sketchbook…

and make a shortcut from desktop to the cmd ( icon)

 ![processing_command_line_start_bat_run](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/b/b53293e0f74e6b07765d92849423b60dcb57abb4.png)

* * *

yes export is a good way,  
– but uses 200MB ( java included )  
– must be redone with/after every change of sketch  
++ is great for distribution ( like to other win 10 computer )
