# Exporting to .exe doesnt work

**URL:** <https://discourse.processing.org/t/exporting-to-exe-doesnt-work/39345>\
**Category:** Processing\
**Created:** [October 18, 2022, 6:48pm UTC](https://discourse.processing.org/t/exporting-to-exe-doesnt-work/39345 "2022-10-18T18:48:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![wudy](https://avatars.discourse-cdn.com/v4/letter/w/ee59a6/32.png) [@wudy](https://discourse.processing.org/u/wudy)\
**Post date:** [October 18, 2022, 6:48pm UTC](https://discourse.processing.org/t/exporting-to-exe-doesnt-work/39345/1 "2022-10-18T18:48:32Z")

</div>

Hello!  
My program works fine, but I can’t get the export to work. I get the windows-amd64 folder, but there is no exe file in there. I have no idea what I’m doing wrong. Any help is appreciated!!  
I’m using processing 4.0.1 with Java on Windows

In the console I get this message:

C:\Users\jakob\Desktop\processing4\_projects\snakes\noise\_snakesJava\windows-amd64\launch4j-build.xml  
Compiling resources  
C:\Program Files (x86)\processing-4.0.1-windows-x64\processing-4.0.1\modes\java\application\launch4j\bin\windres.exe: can’t popen `type C:\Users\jakob\AppData\Local\Temp\launch4j1755002834322060967rc’: No error  
Generated resource file…

LANGUAGE 0, 1  
1 RCDATA BEGIN “java\0” END  
2 RCDATA BEGIN “17\0” END  
18 RCDATA BEGIN “1\0” END  
30 RCDATA BEGIN “2\0” END  
12 RCDATA BEGIN “-Djna.nosys=true -Djava.library.path=”“EXEDIR\lib”“\0” END  
1 ICON DISCARDABLE “C:\Program Files (x86)\processing-4.0.1-windows-x64\processing-4.0.1\modes\java\application\application.ico”  
21 RCDATA BEGIN “[https://adoptium.net/\0](https://adoptium.net/%5C0)” END  
20 RCDATA BEGIN “32\0” END  
101 RCDATA BEGIN “An error occurred while starting the application.\0” END  
102 RCDATA BEGIN “This application requires a Java Runtime Environment.\0” END  
103 RCDATA BEGIN “This application requires a Java Runtime Environment\0” END  
104 RCDATA BEGIN “The registry refers to a nonexistent Java Runtime Environment installation or the runtime is corrupted.\0” END  
15 RCDATA BEGIN “noise\_snakesJava\0” END  
16 RCDATA BEGIN “lib\noise\_snakesJava.jar;lib\core.jar;lib\gluegen-rt.jar;lib\jogl-all.jar\0” END

windows:

BUILD FAILED  
C:\Users\jakob\Desktop\processing4\_projects\snakes\noise\_snakesJava\windows-amd64\launch4j-build.xml:5: net.sf.launch4j.BuilderException: net.sf.launch4j.ExecException: Exec failed (1): C:\Program Files (x86)\processing-4.0.1-windows-x64\processing-4.0.1\modes\java\application\launch4j\bin\windres.exe --preprocessor=type -J rc -O coff -F pe-i386 C:\Users\jakob\AppData\Local\Temp\launch4j1755002834322060967rc C:\Users\jakob\AppData\Local\Temp\launch4j9527183472688095209o  
at net.sf.launch4j.Builder.build(Builder.java:149)  
at net.sf.launch4j.ant.Launch4jTask.execute(Launch4jTask.java:111)  
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:299)  
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)  
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)  
at java.base/java.lang.reflect.Method.invoke(Method.java:568)  
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)  
at org.apache.tools.ant.Task.perform(Task.java:350)  
at org.apache.tools.ant.Target.execute(Target.java:449)  
at org.apache.tools.ant.Target.performTasks(Target.java:470)  
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1401)  
at org.apache.tools.ant.Project.executeTarget(Project.java:1374)  
at processing.mode.java.JavaBuild.buildWindowsLauncher(JavaBuild.java:1151)  
at processing.mode.java.JavaBuild.exportApplication(JavaBuild.java:978)  
at processing.mode.java.JavaBuild.exportApplication(JavaBuild.java:591)  
at processing.mode.java.JavaMode.handleExportApplication(JavaMode.java:183)  
at processing.mode.java.ExportPrompt.trigger(ExportPrompt.java:349)  
at processing.mode.java.ExportPrompt.trigger(ExportPrompt.java:115)  
at processing.mode.java.JavaEditor.handleExportApplication(JavaEditor.java:483)  
at processing.mode.java.JavaEditor.lambda$buildFileMenu$0(JavaEditor.java:238)  
at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1972)  
at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2313)  
at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)  
at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)  
at java.desktop/javax.swing.AbstractButton.doClick(AbstractButton.java:374)  
at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1028)  
at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1072)  
at java.desktop/java.awt.Component.processMouseEvent(Component.java:6626)  
at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3389)  
at java.desktop/java.awt.Component.processEvent(Component.java:6391)  
at java.desktop/java.awt.Container.processEvent(Container.java:2266)  
at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5001)  
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)  
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4833)  
at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948)  
at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4575)  
at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516)  
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310)  
at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2780)  
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4833)  
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)  
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)  
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:716)  
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)  
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)  
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97)  
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:746)  
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:744)  
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)  
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)  
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:743)  
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)  
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)  
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)  
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)  
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)  
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)  
Caused by: net.sf.launch4j.ExecException: Exec failed (1): C:\Program Files (x86)\processing-4.0.1-windows-x64\processing-4.0.1\modes\java\application\launch4j\bin\windres.exe --preprocessor=type -J rc -O coff -F pe-i386 C:\Users\jakob\AppData\Local\Temp\launch4j1755002834322060967rc C:\Users\jakob\AppData\Local\Temp\launch4j9527183472688095209o  
at net.sf.launch4j.Util.exec(Util.java:156)  
at net.sf.launch4j.Cmd.exec(Builder.java:215)  
at net.sf.launch4j.Builder.build(Builder.java:100)  
… 57 more

Total time: 1 second

---

<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:** [October 18, 2022, 8:32pm UTC](https://discourse.processing.org/t/exporting-to-exe-doesnt-work/39345/2 "2022-10-18T20:32:18Z")

</div>

Hi @wudy,

Welcome to the forum! 😉

When you have this kind of issue, you can search on GitHub issues on the Processing repository:

> **[Issues · processing/processing](https://github.com/processing/processing/issues?q=net.sf.launch4j.ExecException)**
>
> Source code for the Processing Core and Development Environment (PDE) - Issues · processing/processing

> <https://github.com/processing/processing/issues/4801>
>
> Every time I try to export a sketch I get the following error. It doesn't matter… if I export it for Windows or for Linux or if I embed Java or not.
> 
> Windows 8.1 64bit
> Processing 3.2.3 (I tried to reinstall it, didn't solve the error)
> Java 8 Update 111 64 bit, JRE and JDK (reinstalled them too, didn't work as well)
> 
> As I mentioned in the title: This error occurs at every sketch, even when exporting an example sketch.
> Compiling and running the sketch in processing itself works fine.
> 
> As you can read in the error message down below, it seems that something doesn't work with the JRE. I have reinstalled it and I found some old registry entrys of older java versions and I deleted them. Didn't solved the problem.
> The Windows System PATH variable is also not the problem, it stores the current java runtime.
> 
> \`\`\`
> 102 RCDATA BEGIN "This application was configured to use a bundled Java Runtime Environment but the runtime is missing or corrupted.\\0" END
> 103 RCDATA BEGIN "This application requires a Java Runtime Environment\\0" END
> 104 RCDATA BEGIN "The registry refers to a nonexistent Java Runtime Environment installation or the runtime is corrupted.\\0" END
> \`\`\`
> 
> \_Addition 1:\_
> During the "export attempt", a folder called "application.windows32" appears in the sketch folder, which is strange because I have 64 bit Windows and 64 bit Java as well as 64 bit Processing installed. In the folder there are two more folders called "data" and "lib" and two files called "launch4j-build.xml" and "launch4j-config.xml", but there is no .exe.
> You can find the content of both .xml files here: 
> \- http://pastebin.com/ecSjcMWU (launch4j-build)
> \- http://pastebin.com/DZHGxRrZ (launch4j-config)
> 
> \_Addition 2:\_
> I tried to export some sketches with Processing 32 bit but it didn't solve the problem, I get the same error message.
> 
> Thank you :)
> 
> 
> \*\*Full Error:\*\*
> \`\`\`
> Compiling resources
> C:\\Users\\User\\Documents\\Programme\\processing-3.2.3-windows64\\processing-3.2.3\\modes\\java\\application\\launch4j\\bin\\windres.exe: can't popen \`type C:\\Users\\User\\AppData\\Local\\Temp\\launch4j4905610603467284144rc': No error
> Generated resource file...
> 
> LANGUAGE 0, 1
> 2 RCDATA BEGIN "1.8.0\_74\\0" END
> 18 RCDATA BEGIN "1\\0" END
> 30 RCDATA BEGIN "2\\0" END
> 12 RCDATA BEGIN "-Djna.nosys=true -Djava.library.path=""%EXEDIR%\\\\lib""\\0" END
> 1 ICON DISCARDABLE "C:\\\\Users\\\\User\\\\Documents\\\\Programme\\\\processing-3.2.3-windows64\\\\processing-3.2.3\\\\modes\\\\java\\\\application\\\\sketch.ico"
> 21 RCDATA BEGIN "http://java.com/download\\0" END
> 20 RCDATA BEGIN "32\\0" END
> 101 RCDATA BEGIN "An error occurred while starting the application.\\0" END
> 102 RCDATA BEGIN "This application was configured to use a bundled Java Runtime Environment but the runtime is missing or corrupted.\\0" END
> 103 RCDATA BEGIN "This application requires a Java Runtime Environment\\0" END
> 104 RCDATA BEGIN "The registry refers to a nonexistent Java Runtime Environment installation or the runtime is corrupted.\\0" END
> 15 RCDATA BEGIN "MidiVideo\\0" END
> 16 RCDATA BEGIN "lib\\\\MidiVideo.jar;lib\\\\core.jar;lib\\\\jogl-all.jar;lib\\\\gluegen-rt.jar;lib\\\\jogl-all-natives-windows-i586.jar;lib\\\\gluegen-rt-natives-windows-i586.jar;lib\\\\themidibus.jar;lib\\\\gstreamer-java.jar;lib\\\\jna.jar;lib\\\\video.jar\\0" END
> 
> 
> windows:
> 
> 
> BUILD FAILED
> C:\\Users\\User\\Documents\\Projekte\\Processing\\MidiVideo\\MidiVideo\\application.windows32\\launch4j-build.xml:5: net.sf.launch4j.BuilderException: net.sf.launch4j.ExecException: Exec failed (1): C:\\Users\\User\\Documents\\Programme\\processing-3.2.3-windows64\\processing-3.2.3\\modes\\java\\application\\launch4j\\bin\\windres.exe --preprocessor=type -J rc -O coff -F pe-i386 C:\\Users\\User\\AppData\\Local\\Temp\\launch4j4905610603467284144rc C:\\Users\\User\\AppData\\Local\\Temp\\launch4j670908774651651981o
> at net.sf.launch4j.Builder.build(Builder.java:149)
> at net.sf.launch4j.ant.Launch4jTask.execute(Launch4jTask.java:111)
> at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
> at org.apache.tools.ant.Task.perform(Task.java:348)
> at org.apache.tools.ant.Target.execute(Target.java:390)
> at org.apache.tools.ant.Target.performTasks(Target.java:411)
> at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
> at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
> at processing.mode.java.JavaBuild.buildWindowsLauncher(JavaBuild.java:1215)
> at processing.mode.java.JavaBuild.exportApplication(JavaBuild.java:1086)
> at processing.mode.java.JavaBuild.exportApplication(JavaBuild.java:703)
> at processing.mode.java.JavaMode.handleExportApplication(JavaMode.java:248)
> at processing.mode.java.JavaEditor.exportApplicationPrompt(JavaEditor.java:943)
> at processing.mode.java.JavaEditor.handleExportApplication(JavaEditor.java:573)
> at processing.mode.java.JavaEditor$3.actionPerformed(JavaEditor.java:196)
> at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
> at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
> at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
> at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
> at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
> at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:833)
> at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:877)
> at java.awt.Component.processMouseEvent(Component.java:6533)
> at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
> at java.awt.Component.processEvent(Component.java:6298)
> at java.awt.Container.processEvent(Container.java:2236)
> at java.awt.Component.dispatchEventImpl(Component.java:4889)
> at java.awt.Container.dispatchEventImpl(Container.java:2294)
> at java.awt.Component.dispatchEvent(Component.java:4711)
> at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
> at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
> at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
> at java.awt.Container.dispatchEventImpl(Container.java:2280)
> at java.awt.Window.dispatchEventImpl(Window.java:2746)
> at java.awt.Component.dispatchEvent(Component.java:4711)
> at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
> at java.awt.EventQueue.access$500(EventQueue.java:97)
> at java.awt.EventQueue$3.run(EventQueue.java:709)
> at java.awt.EventQueue$3.run(EventQueue.java:703)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
> at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
> at java.awt.EventQueue$4.run(EventQueue.java:731)
> at java.awt.EventQueue$4.run(EventQueue.java:729)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
> at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
> at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
> at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
> at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
> at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
> at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
> at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
> Caused by: net.sf.launch4j.ExecException: Exec failed (1): C:\\Users\\User\\Documents\\Programme\\processing-3.2.3-windows64\\processing-3.2.3\\modes\\java\\application\\launch4j\\bin\\windres.exe --preprocessor=type -J rc -O coff -F pe-i386 C:\\Users\\User\\AppData\\Local\\Temp\\launch4j4905610603467284144rc C:\\Users\\User\\AppData\\Local\\Temp\\launch4j670908774651651981o
> at net.sf.launch4j.Util.exec(Util.java:156)
> at net.sf.launch4j.Cmd.exec(Builder.java:215)
> at net.sf.launch4j.Builder.build(Builder.java:100)
> ... 57 more
> 
> Total time: 0 seconds
> 
> \`\`\`

I don’t know if one of them solves your issue but otherwise you can create a new one (if you are familiar with GitHub and have an account). Maybe on [Processing4’s repository](https://github.com/processing/processing4/issues) since you are using it…
