# Exporting P2D Programs

**URL:** https://discourse.processing.org/t/exporting-p2d-programs/28712
**Category:** Processing
**Created:** [March 22, 2021, 3:56am UTC](https://discourse.processing.org/t/exporting-p2d-programs/28712 "2021-03-22T03:56:56Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![s31](https://avatars.discourse-cdn.com/v4/letter/s/b77776/32.png) [@s31](https://discourse.processing.org/u/s31)
#### Post date: [March 22, 2021, 3:56am UTC](https://discourse.processing.org/t/exporting-p2d-programs/28712/1 "2021-03-22T03:56:56Z")

</div>

When I export a program using the P2D renderer the exe file created does not open. Is there anyway to fix this issue? I am using a surface pro 7.

---

<div class="post-metadata">

### Author: ![josephh](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/josephh/32/210_2.png) [@josephh](https://discourse.processing.org/u/josephh)
#### Post date: [March 22, 2021, 6:30pm UTC](https://discourse.processing.org/t/exporting-p2d-programs/28712/2 "2021-03-22T18:30:33Z")

</div>

Hi,

I am on Linux and exporting a P2D application works fine. Did you check the option :

![Capture d’écran de 2021-03-22 19-25-56](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/0/0b5463393ff596634883f1640d4eae92e0ca5e3d.png)

In this case for Windows, but it’s packaging Java with your application which can solve some problems (for example in my case, the Java version installed on my system is not the same as the one Processing is using therefore causing errors 😉 )

Can you also try to launch the application from the command line and tell us if there’s an error or something?

Simply navigate to the location where your application was exported and run the `.exe` from the cmd prompt.

Also are you sure that your sketch shows something on the screen when not exported? (dumb question but we never know…)

---

<div class="post-metadata">

### Author: ![s31](https://avatars.discourse-cdn.com/v4/letter/s/b77776/32.png) [@s31](https://discourse.processing.org/u/s31)
#### Post date: [March 23, 2021, 12:14am UTC](https://discourse.processing.org/t/exporting-p2d-programs/28712/3 "2021-03-23T00:14:32Z")

</div>

Thanks Joseph,

I embedded java with my P2D sketch, and it fixed the issue! However, when I attempted to export a P3D application it had the same issue as earlier. I embedding java with it, but it still didn’t work. I tried opening the .exe file with cmd prompt and got this error.

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/a/a3cc3cd01f390c54a39cff454ea79cbeb1e272f6.png)  
The sketch works as intended in the processing shell but doesn’t open when exported. Do you know any way I could fix this?

---

<div class="post-metadata">

### Author: ![josephh](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/josephh/32/210_2.png) [@josephh](https://discourse.processing.org/u/josephh)
#### Post date: [March 23, 2021, 12:43am UTC](https://discourse.processing.org/t/exporting-p2d-programs/28712/4 "2021-03-23T00:43:07Z")

</div>

Hi @s31 ,

From this link : [[FIX] This App Can't Run On Your PC](https://www.kapilarya.com/fix-this-app-cant-run-on-your-pc-windows-10)

Looks like this error is shown where you are trying to execute a 32bit program on a 64bit machine (which I suppose you are running on).

When you are exporting your application, Processing usually create folders corresponding to different cpu architectures (32, 64bit, arm64…). You need to run the executable corresponding to your operating system for it to work.

For example on Linux I have the folders :

```auto
application.linux32 
application.linux64 
application.linux-arm64
application.linux-armv6hf

```

---

<div class="post-metadata">

### Author: ![s31](https://avatars.discourse-cdn.com/v4/letter/s/b77776/32.png) [@s31](https://discourse.processing.org/u/s31)
#### Post date: [March 23, 2021, 1:13am UTC](https://discourse.processing.org/t/exporting-p2d-programs/28712/5 "2021-03-23T01:13:10Z")

</div>

Hi @josephh, many thanks for the support so far.

I tried using the 64bit version instead of the 32bit, but to no avail. I did find a way to fix the issue, but it requires removing a key component of my sketch. I was using the video library in my P3D sketch and found that if I removed it from the sketch the exported application runs as expected. Why is this? The video library works faultlessly in the processing shell using P3D, so I don’t understand why it wouldn’t work when exported.

---

<div class="post-metadata">

### Author: ![josephh](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/josephh/32/210_2.png) [@josephh](https://discourse.processing.org/u/josephh)
#### Post date: [March 23, 2021, 9:55am UTC](https://discourse.processing.org/t/exporting-p2d-programs/28712/6 "2021-03-23T09:55:25Z")

</div>

Yes, issues with the video library have been addressed before when exporting an application :

> [@Exporting Sketch With Movie Is Blank](https://discourse.processing.org/t/exporting-sketch-with-movie-is-blank/27983):
>
> Hi, I’m having issues with exporting a sketch that has a movie in it from the Video library from processing. When I run the sketch, it runs fine and the video plays. But, when I export the sketch to an exe and try to run it, it displays nothing (just a blank screen). import java.\*; import processing.sound.\*; import processing.video.\*; Movie movie; void setup() { size(1000,1000,P2D); movie = new Movie(this, "keyboard-cat.mov"); // movie.width = width; // movie.height = height; movie…

When you run the application, does it open and if yes what do you see?
