We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpIntegration › creating standalone windows exe
Page Index Toggle Pages: 1
creating standalone windows exe? (Read 1772 times)
creating standalone windows exe?
Apr 7th, 2008, 4:58pm
 
hey guys

what's the current state of the art for creating a single, standalone windows .EXE file (for distribution) from a Processing sketch?

I've tried both Launch4J and Jsmooth and am having problems with both.  Has anyone used these successfully, or some other tools for adding wrappers to JARs?

Also can someone point me to a statement of how licensing would work if core.jar gets bundled inside the .EXE.... does the resulting distribution have to be LGPL?


thanks



Re: creating standalone windows exe?
Reply #1 - Apr 7th, 2008, 5:32pm
 
Do you mean so that the end user doesn't need to have java installed or not? Or so that it's just a single file that you need to distribute instead of a directory?

I'm assuming that processing's built in "Export as Application" doesn't do what you want?
Re: creating standalone windows exe?
Reply #2 - Apr 7th, 2008, 6:06pm
 
Quote:
Or so that it's just a single file that you need to distribute instead of a directory?


yes.  Solving the issue of the app running reliably regardless of what version of java is installed would be a useful side-effect though. (Launch4J is supposed to be able to do this, but I couldn't get it work.)

Quote:
I'm assuming that processing's built in "Export as Application" doesn't do what you want?


No it doesn't.  "export as application" doesn't create a single file, it creates a stub (.exe) and a lib folder with 2 JARs in it: core.jar with P5 core and a second JAR with the rest of the code (same name as the sketch + .jar).

(On OSX this is a complete no-brainer, because everything is bundled together as an application package.)  
Re: creating standalone windows exe?
Reply #3 - Apr 8th, 2008, 3:41am
 
using exe4j or j2ewiz
Re: creating standalone windows exe?
Reply #4 - Apr 8th, 2008, 4:46pm
 
liquid wrote on Apr 8th, 2008, 3:41am:
using exe4j or j2ewiz


Excellent, I used the trial version of JAR2EXE (seems to be new name for j2ewiz) and that worked fine.  

http://www.regexlab.com/en/jar2exe/

I put my own icon in, which shows up on the EXE but when it runs it reverts to the java coffee-cup, but I can live with that for now.


Thanks for the tip, liquid!


Re: creating standalone windows exe?
Reply #5 - Apr 8th, 2008, 4:53pm
 
I think you need http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Frame.html#setIconImage(java.awt.Image) to set the little icon in the title bar.
Re: creating standalone windows exe?
Reply #6 - Apr 8th, 2008, 5:52pm
 
check out some of these projects on SourceForge
http://sourceforge.net/search/?type_of_search=soft&type_of_search=soft&words=jar+to+exe

fb
Re: creating standalone windows exe?
Reply #7 - Apr 8th, 2008, 6:36pm
 
Quote:
I think you need http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Frame.html#setIconImage(java.awt.Image) to set the little icon in the title bar.


Thanks John.  

Searching for setIconImage brought up this page in the docs that I'd not managed to see before (why is it so hard to find stuff on that site?)... this includes sample code for setting both the icon and the title bar text:

http://www.processing.org/reference/environment/export.html

Page Index Toggle Pages: 1