# Export to exe file

**URL:** <https://discourse.processing.org/t/export-to-exe-file/23186>\
**Category:** Processing for Android\
**Created:** [August 11, 2020, 3:47pm UTC](https://discourse.processing.org/t/export-to-exe-file/23186 "2020-08-11T15:47:06Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![paturn](https://avatars.discourse-cdn.com/v4/letter/p/34f0e0/32.png) [@paturn](https://discourse.processing.org/u/paturn)\
**Post date:** [August 11, 2020, 3:47pm UTC](https://discourse.processing.org/t/export-to-exe-file/23186/1 "2020-08-11T15:47:06Z")

</div>

I’ve been away from Processing for a few months, but I’m back now.  
My last query about decoupling text from image rotation is resolved. Thank you.  
I now need to do the following -  
1: export sketch to exe file Windows 10  
2: export sketch to android 10 platform  
When I tried this previously I received the following errors

1.5.1 standard or android but no support p3d  
2.2.1 java but no support p3d  
3.5.4 java p3d OK. No exe or android apk  
4.0a1 java p3d OK. No exe or android apk

Any solutions?

---

<div class="post-metadata">

**Author:** ![noel](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/noel/32/213_2.png) [@noel](https://discourse.processing.org/u/noel)\
**Post date:** [August 12, 2020, 8:25am UTC](https://discourse.processing.org/t/export-to-exe-file/23186/2 "2020-08-12T08:25:19Z")

</div>

> [@paturn](#):
>
> Any solution

Even simple example sketches?

---

<div class="post-metadata">

**Author:** ![paturn](https://avatars.discourse-cdn.com/v4/letter/p/34f0e0/32.png) [@paturn](https://discourse.processing.org/u/paturn)\
**Post date:** [August 12, 2020, 9:22am UTC](https://discourse.processing.org/t/export-to-exe-file/23186/3 "2020-08-12T09:22:11Z")

</div>

No Noel. I’m still waiting for replies.

Regards  
Peter Turner

---

<div class="post-metadata">

**Author:** ![noel](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/noel/32/213_2.png) [@noel](https://discourse.processing.org/u/noel)\
**Post date:** [August 12, 2020, 9:53am UTC](https://discourse.processing.org/t/export-to-exe-file/23186/4 "2020-08-12T09:53:25Z")

</div>

When you “Export the Android project”, what exactly shows up in the console?

---

<div class="post-metadata">

**Author:** ![paturn](https://avatars.discourse-cdn.com/v4/letter/p/34f0e0/32.png) [@paturn](https://discourse.processing.org/u/paturn)\
**Post date:** [August 12, 2020, 10:33am UTC](https://discourse.processing.org/t/export-to-exe-file/23186/5 "2020-08-12T10:33:49Z")

</div>

Options for Windows or Linux  
Embedded java

I get an exe file in application.windows64 but it won’t run when double clicked, and one in application.windows32 which gives an error.

I think I might need to define some data location, somewhere. The only external data sources are a series of maps located in a Windows folder.

Regards  
Peter Turner

---

<div class="post-metadata">

**Author:** ![noel](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/noel/32/213_2.png) [@noel](https://discourse.processing.org/u/noel)\
**Post date:** [August 12, 2020, 2:09pm UTC](https://discourse.processing.org/t/export-to-exe-file/23186/6 "2020-08-12T14:09:14Z")

</div>

These are the export parameters written in my preferences.txt file.  
What are yours?

```auto
export.application.embed_java=true
export.application.fullscreen=false
export.application.platform_macosx=false
export.application.platform_windows=true
export.application.present=false
export.application.stop=true
export.delete_target_folder=true

```

---

<div class="post-metadata">

**Author:** ![akenaton](https://avatars.discourse-cdn.com/v4/letter/a/a88e4f/32.png) [@akenaton](https://discourse.processing.org/u/akenaton)\
**Post date:** [August 14, 2020, 12:47pm UTC](https://discourse.processing.org/t/export-to-exe-file/23186/7 "2020-08-14T12:47:56Z")

</div>

@paturn ===

- as for windows.exe is your sketch using the data folder?

- as for android what happens? is created the android folder? does the console fires some error message? which one?

- and anyway does this happen when using some basic example (not using P3D)

---

<div class="post-metadata">

**Author:** ![paturn](https://avatars.discourse-cdn.com/v4/letter/p/34f0e0/32.png) [@paturn](https://discourse.processing.org/u/paturn)\
**Post date:** [August 23, 2020, 11:49am UTC](https://discourse.processing.org/t/export-to-exe-file/23186/8 "2020-08-23T11:49:39Z")

</div>

Processing 3.5.4  
I can get export to exe working OK, without a data folder - just using the original path in the pde.

However, I’m struggling with the android mode. It asks for the sdk location, I give it the location manually (it doesn’t find it automatically) but it says the Android SDK could not be loaded. It tells me to load Android Studio to extract (another) sdk path but it won’t download or install Android Studio. It tells me to check Environment Variables.

Is it that complicated to run in android mode?

Regards  
Peter Turner

---

<div class="post-metadata">

**Author:** ![noel](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/noel/32/213_2.png) [@noel](https://discourse.processing.org/u/noel)\
**Post date:** [August 23, 2020, 2:49pm UTC](https://discourse.processing.org/t/export-to-exe-file/23186/9 "2020-08-23T14:49:53Z")

</div>

I don’t have problems with this at all. I just use [this SDK folder](https://drive.google.com/file/d/1JIMtod4Qxo8_ciJmZyfPKydyu0Xd6kDa/view) and unzip it in the documents/processing folder or elsewhere. Then open I the preferences.txt file. (The location you can find at the bottom of the File/settings menu.) In the android parameters you will find something like:

```auto
android.emulator.image.abi=x86
android.emulator.port.phone=5566
android.sdk.ar=1.12.0
android.sdk.gvr=1.180.0
android.sdk.path=D:\an\android\sdk
android.sdk.play_services=16.0.1
android.sdk.support=28.0.0
android.sdk.target=28
android.sdk.wear=2.4.0

```

Change/set or correct the right sdk path as where you saved it.  
**Close processing’s IDE** and only than save the preferences.txt file.  
Then start ide again.

---

<div class="post-metadata">

**Author:** ![paturn](https://avatars.discourse-cdn.com/v4/letter/p/34f0e0/32.png) [@paturn](https://discourse.processing.org/u/paturn)\
**Post date:** [August 24, 2020, 8:12am UTC](https://discourse.processing.org/t/export-to-exe-file/23186/10 "2020-08-24T08:12:03Z")

</div>

Thank you for your reply, Noel.

I’m not at my computer today, but I’ll try it tomorrow.

I do use android sdk up to 26 and beyond in numerous apps with Eclipse software, and I hope the additional sdk location doesn’t upset the working of those apps, some of which have been working successfully for up to 5 years.

Regards  
Peter Turner

---

<div class="post-metadata">

**Author:** ![paturn](https://avatars.discourse-cdn.com/v4/letter/p/34f0e0/32.png) [@paturn](https://discourse.processing.org/u/paturn)\
**Post date:** [August 26, 2020, 9:42am UTC](https://discourse.processing.org/t/export-to-exe-file/23186/11 "2020-08-26T09:42:13Z")

</div>

Thank you Noel.

I have it part-working, but I get many error messages which are difficult to read (red against black background). I think green text would look better.

I have tried  
console.log(colors.fg.green);  
or  
console.log(color(0,255,0);  
but neither work.

Any suggestions?

Regards  
Peter Turner

---

<div class="post-metadata">

**Author:** ![noel](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/noel/32/213_2.png) [@noel](https://discourse.processing.org/u/noel)\
**Post date:** [August 26, 2020, 11:25am UTC](https://discourse.processing.org/t/export-to-exe-file/23186/12 "2020-08-26T11:25:33Z")

</div>

In the theme.txt file, located at C:\Program Files (x86)\processing-3.5.3\lib on my pc; you will find the parameters to change. It looks something like:

```auto
# CONSOLE
# The font is handled by preferences, so its size/etc are modifiable.
console.color = #000000
console.output.color = #cccccc
# text color for errors printed in the console
console.error.color = #d9211e

```

PS. Remember to only save the file with the IDE closed!

---

<div class="post-metadata">

**Author:** ![paturn](https://avatars.discourse-cdn.com/v4/letter/p/34f0e0/32.png) [@paturn](https://discourse.processing.org/u/paturn)\
**Post date:** [August 26, 2020, 12:41pm UTC](https://discourse.processing.org/t/export-to-exe-file/23186/13 "2020-08-26T12:41:50Z")

</div>

Thank you Noel.

It certainly is more visible, but a lot slower  
(Build 6m 41s vs 2m 40s)

I had resorted to highlighting the error messages, copying them and pasting them on Notepad.exe.

Now to find what the errors are …n

Regards  
Peter Turner

---

<div class="post-metadata">

**Author:** ![paturn](https://avatars.discourse-cdn.com/v4/letter/p/34f0e0/32.png) [@paturn](https://discourse.processing.org/u/paturn)\
**Post date:** [August 27, 2020, 12:04pm UTC](https://discourse.processing.org/t/export-to-exe-file/23186/14 "2020-08-27T12:04:33Z")

</div>

Build time is back to 2m 40s so the first one must have been an anomaly.

I’m trying to catch a key down event from the virtual keyboard produced from InputMethodManager. I’ve tried keyPressed() onKeyDown() keyDown() keydown() but only keyPressed captures ENTER or BACKSPACE or SHIFT with android.view.keyEvent imported, but not ‘d’, ‘D’, “d”, " D", KeyEvent.KEYCODE\_D. Any ideas?

Also, during a “successful build” of approx 2m 40s I always get 28 actionable Tasks with 28 executed, most of which refer to debug. Is this an indication of errors, or always to be expected?

Regards  
Peter Turner

---

<div class="post-metadata">

**Author:** ![noel](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/noel/32/213_2.png) [@noel](https://discourse.processing.org/u/noel)\
**Post date:** [August 27, 2020, 5:58pm UTC](https://discourse.processing.org/t/export-to-exe-file/23186/15 "2020-08-27T17:58:02Z")

</div>

Is it to capture a key event in an edit text box?

---

<div class="post-metadata">

**Author:** ![paturn](https://avatars.discourse-cdn.com/v4/letter/p/34f0e0/32.png) [@paturn](https://discourse.processing.org/u/paturn)\
**Post date:** [August 27, 2020, 6:25pm UTC](https://discourse.processing.org/t/export-to-exe-file/23186/16 "2020-08-27T18:25:40Z")

</div>

No Noel. I am not using edit boxes.

I use the virtual keyboard to generate key strokes, and detect each one via keyPressed (or some other procedure) which is then translated to a string, and this is used to adjust the image centred on the screen.

This works OK in Processing for Windows exe, but it doesn’t detect the alphanumeric keystrokes in Processing for Android, only ENTER and BACKSPACE.

I have previously used EditText boxes in Eclipse for Android. Can I use them in Processing for Android? If so, then this may be an alternative solution.

Regards  
Peter Turner

---

<div class="post-metadata">

**Author:** ![noel](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/noel/32/213_2.png) [@noel](https://discourse.processing.org/u/noel)\
**Post date:** [August 27, 2020, 7:10pm UTC](https://discourse.processing.org/t/export-to-exe-file/23186/17 "2020-08-27T19:10:26Z")

</div>

> [@paturn](#):
>
> Can I use them in Processing for Android?

Se various codes [here](https://github.com/EmmanuelPil/Android-java-code-utilities-widgets-for-Processing-for-Android)

---

<div class="post-metadata">

**Author:** ![paturn](https://avatars.discourse-cdn.com/v4/letter/p/34f0e0/32.png) [@paturn](https://discourse.processing.org/u/paturn)\
**Post date:** [September 12, 2020, 4:03pm UTC](https://discourse.processing.org/t/export-to-exe-file/23186/18 "2020-09-12T16:03:09Z")

</div>

Hi Noel.

I’ve almost completed my code, thanks to your reference to EditBox (and Menu).

I’m now stuck with a problem :- I need to rotate a 3D image with the mouse button. It works OK in Windows, but not on the android phone. I think the problem is the use of mouseDragged() and mouseMoved(). In Windows using a mouse, mouseDragged() is interpreted correctly to rotate the image. However in Android, because there is no separate mouse button to click or hold down, it is interpreted as a mouseMoved() event, and does not trigger the mouseDragged() event required.

I have tried

void mouseMoved() {  
redraw(); // to call draw() each time  
}

void mouseDragged() {  
redraw(); // to call draw() each time  
}

but this doesn’t work.

Any ideas?

Regards  
Peter Turner

---

<div class="post-metadata">

**Author:** ![noel](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/noel/32/213_2.png) [@noel](https://discourse.processing.org/u/noel)\
**Post date:** [September 14, 2020, 7:58pm UTC](https://discourse.processing.org/t/export-to-exe-file/23186/19 "2020-09-14T19:58:50Z")

</div>

Sorry for the late reply.  
[Here](https://discourse.processing.org/t/creating-a-structure-of-linked-tetrahedra/16955/8) is how I rotate 3D on android.  
It’s a code I wrote to rotate a shape, just replace it with an image.

---

<div class="post-metadata">

**Author:** ![paturn](https://avatars.discourse-cdn.com/v4/letter/p/34f0e0/32.png) [@paturn](https://discourse.processing.org/u/paturn)\
**Post date:** [September 15, 2020, 8:45am UTC](https://discourse.processing.org/t/export-to-exe-file/23186/20 "2020-09-15T08:45:50Z")

</div>

Thank you Noel. A very effective demonstration, and the code’s working well on my project.

Regards  
Peter Turner

[Next page](https://discourse.processing.org/t/export-to-exe-file/23186.md?page=2)
