Exporting P2D Programs

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.

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

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 :wink: )

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…)

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.


The sketch works as intended in the processing shell but doesn’t open when exported. Do you know any way I could fix this?

1 Like

Hi @s31 ,

From this link : [FIX] This App Can't Run On Your PC

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 :

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

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.

2 Likes

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

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