I am also having some trouble getting a sketch to export as an executable, stand-alone application. I've tried both the Windows 32-bit and 64-bit versions of Processing 2.1 (27 October 2013) and can't seem to find the .exe after exporting. Thank you for your help.
I can confirm the generated exe file doesn't work with Processing 2.1 on Windows 7 (64-bit, but using the 32-bit version of Processing), neither with and without embedded Java.
I copied the .bat file generated in application.windows64 after export in Processing 2.0, changed the name of the sketch, and I was able to launch the exported sketch (using Java 7 installed on my computer).
Content of this file:
@echo off java -Djava.ext.dirs=lib -Djava.library.path=lib YourSketchName
Make a run.bat (or run.cmd) file (the 'run' can be changed to anything you want, eg. the name of your sketch), put the content I show in it, replacing 'YourSketchName' by... the name of your sketch.
But it beside the generated .exe.
You should be able to run the sketch by double-clicking this file (instead of the .exe).
I am having the same problem. Running either v2.1 64bit and 32bit, on Vista 64bit neither the application.windows32 folder with the .exe created, or the application.windows64 .bat file produce any result, i.e. the exe doesn't run.
My work-around is that I have an older version, processing-2.0b8 , that I'm using to export instead, which does produce a work-able .exe file.
I am running into the same export problem. I've been using Processing for years and have never had this problem in previous versions. I'm running Windows 8 64 bit. The sketch works fine when I run it from the IDE.
The 32 bit executable makes an .exe which does not seem to run. Double clicking it appears to do nothing- there is no error message or any sign that anything has happened.
The 64 bit executable makes a .bat file which also does not seem to run. A console window flashes briefly but closes before I can read what it says.
If anyone knows what's wrong or can point me in the direction of an older version of Processing with working export I'd appreciate it. Thanks!
i got an 64bit export (incl. java) with processing 2.1.1 (Windows 7 64bit) working. But when I copy the exported application to a different computer(Windows 7 64bit) the application ist not working.
When I execute the *.bat I get a console message :
C:\Users\NRL>java -Djava.ext.dirs=lib -Djava.library.path=lib go
Fehler: Hauptklasse go konnte nicht gefunden oder geladen werden
(english: Error: main class go couldn't be found or be loaded)
Removing the contents of the first line in the args.txt file solved this issue for me when compiling with the 32bit version of processing on windows. Simply delete the text, but leave the line break in so that the first line has nothing. No need to create a bat file when doing this.
+1 for removing first line of args.txt in compiled lib folder. .exe runs now for me on 32bit windows. The line was just some random brackets [] holding up the execution somehow...
Needing to have a sketch run automatically on boot every time. I've been unable to get any exported Processing applications to work on Win 7 64-bit,
The console flashes, then nothing. It appears to be a problem locating Java, that I haven't had enough patience to figure out.
I've tried the line swap/delete for 32bit successfully but unfortunately some of the libraries require 64-bit Java.
Desperate for this functionality, I used AutoHotKey to script opening the PDE file and then sending ctrl + R keystroke to run. It's workable.
Hey all just wanted to confirm that these methods still work. 29 march 2014
-switch the 1st and the 2nd row in the application.windows32/lib/args.txt file
or
-create at new txt file with notepad and put this in it:
@echo off
"C:\Program Files (x86)\Java\jre7\bin\javaw.exe" -Djava.ext.dirs=lib -Djava.library.path=lib Mainfile
-then save it as all files and put .bat after your name. Example:
Game.bat
also since java 7 putting your java security on medium helps fix some bugs.
Answers
Please give details of what code you are trying to run, on which operating system and how (compiled as an executable?).
Code from example and exported from menu, OS windows 7, Java 7 update 45. No error, but not happened when double click.
thank.
Which example? What menu?
Run OK.
Export with Menu File Export Application
[Ex_06.exe]
It same, nothing to do.
thank.
I don't have a Windows machine to try it myself. Hopefully someone else from the forum will be able to help.
In the meantime, you can have a look at that page: http://wiki.processing.org/w/Export_Info_and_Tips
I am also having some trouble getting a sketch to export as an executable, stand-alone application. I've tried both the Windows 32-bit and 64-bit versions of Processing 2.1 (27 October 2013) and can't seem to find the .exe after exporting. Thank you for your help.
I can confirm the generated exe file doesn't work with Processing 2.1 on Windows 7 (64-bit, but using the 32-bit version of Processing), neither with and without embedded Java.
I copied the .bat file generated in application.windows64 after export in Processing 2.0, changed the name of the sketch, and I was able to launch the exported sketch (using Java 7 installed on my computer).
Content of this file:
@echo off
java -Djava.ext.dirs=lib -Djava.library.path=lib YourSketchName
At least, it offers a working workaround...
Thanks PhiLho, wondering if you could explain that work-around in detail for me ?
I am using v2.1 (REV 0223), which has a much better serial library and would like to export some stand-alone apps. Thanks again.
Make a run.bat (or run.cmd) file (the 'run' can be changed to anything you want, eg. the name of your sketch), put the content I show in it, replacing 'YourSketchName' by... the name of your sketch.
But it beside the generated .exe.
You should be able to run the sketch by double-clicking this file (instead of the .exe).
I am having the same problem. Running either v2.1 64bit and 32bit, on Vista 64bit neither the application.windows32 folder with the .exe created, or the application.windows64 .bat file produce any result, i.e. the exe doesn't run.
My work-around is that I have an older version, processing-2.0b8 , that I'm using to export instead, which does produce a work-able .exe file.
Ugh.. just ran into this bug... and found the same issue. Works fine in 2.03 release but fails in 2.1 release.
Any idea on if this is going to be getting fixed soon? or maybe a beta release of 2.1 that is currently working?
I am running into the same export problem. I've been using Processing for years and have never had this problem in previous versions. I'm running Windows 8 64 bit. The sketch works fine when I run it from the IDE.
The 32 bit executable makes an .exe which does not seem to run. Double clicking it appears to do nothing- there is no error message or any sign that anything has happened.
The 64 bit executable makes a .bat file which also does not seem to run. A console window flashes briefly but closes before I can read what it says.
If anyone knows what's wrong or can point me in the direction of an older version of Processing with working export I'd appreciate it. Thanks!
switch the 1st and the 2nd row in the application.windows32/lib/args.txt file
Hi,
i got an 64bit export (incl. java) with processing 2.1.1 (Windows 7 64bit) working. But when I copy the exported application to a different computer(Windows 7 64bit) the application ist not working.
When I execute the *.bat I get a console message :
C:\Users\NRL>java -Djava.ext.dirs=lib -Djava.library.path=lib go
Fehler: Hauptklasse go konnte nicht gefunden oder geladen werden
(english: Error: main class go couldn't be found or be loaded)
Any ideas, I'm confused.
Is go the name of your sketch?
Have you copied also the content of the lib folder? (And the data folder, if relevant.)
Nothing happens when I click “Run”!
I can load and export the example Books/Processing Handbook/Unit 00-17/07 Shape 2/Ex-06 and it works, but nothing happens when I click "Run" buttom.
This is my log file, any ideas?
Thanks
Removing the contents of the first line in the args.txt file solved this issue for me when compiling with the 32bit version of processing on windows. Simply delete the text, but leave the line break in so that the first line has nothing. No need to create a bat file when doing this.
+1 for removing first line of args.txt in compiled lib folder. .exe runs now for me on 32bit windows. The line was just some random brackets [] holding up the execution somehow...
Thanks Boss!
I have made it work checking on the "embed java" option and editing the .bat file:
@echo off java\bin\java.exe -Djava.ext.dirs=lib -Djava.library.path=lib ProgramName
The problem is that Windows is not able to find the path to java.
Needing to have a sketch run automatically on boot every time. I've been unable to get any exported Processing applications to work on Win 7 64-bit, The console flashes, then nothing. It appears to be a problem locating Java, that I haven't had enough patience to figure out.
I've tried the line swap/delete for 32bit successfully but unfortunately some of the libraries require 64-bit Java.
Desperate for this functionality, I used AutoHotKey to script opening the PDE file and then sending ctrl + R keystroke to run. It's workable.
Two persons mention a problem to locate Java.
You can:
Hey all just wanted to confirm that these methods still work. 29 march 2014 -switch the 1st and the 2nd row in the application.windows32/lib/args.txt file or -create at new txt file with notepad and put this in it:
@echo off "C:\Program Files (x86)\Java\jre7\bin\javaw.exe" -Djava.ext.dirs=lib -Djava.library.path=lib Mainfile
-then save it as all files and put .bat after your name. Example: Game.bat
Anyone getting this same problem with Processing 2.2.1 on Windows? I see args.txt has been removed so can't change that...