Why execute not run (Processing 2.1)

edited October 2013 in Using Processing

I'm test complied code by Processing 2.1, the execute file not run. Why?

Answers

  • edited October 2013

    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?

  • edited October 2013
    1. Load from Menu File Examples..
        // Books/Processing Handbook/Unit 00-17/07 Shape 2/Ex-06
        noStroke();
        fill(0);
        beginShape();
        vertex(40, 10);
        for (int i = 20; i 
    1. Run OK.

    2. Export with Menu File Export Application

    • select Embed java
    • select unembed java

    [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.

  • edited November 2013

    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.

  • edited November 2013

    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?

  • edited January 2014

    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

  • edited February 2014

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

  • edited February 2014

    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?

    CmdLine:    C:\Users\dregaladod\Downloads\Learning\processing-2.1.1\processing.exe --l4j-debug
    WOW64:      yes
    Working dir:    C:\Users\dregaladod\Downloads\Learning\processing-2.1.1\.
    Bundled JRE:    java
    Check launcher: C:\Users\dregaladod\Downloads\Learning\processing-2.1.1\java\bin\javaw.exe (OK)
    Add classpath:  lib\pde.jar
    Add classpath:  core\library\core.jar
    Add classpath:  lib\jna.jar
    Add classpath:  lib\antlr.jar
    Add classpath:  lib\ant.jar
    Add classpath:  lib\ant-launcher.jar
    Add classpath:  lib\org-netbeans-swing-outline.jar
    Add classpath:  lib\com.ibm.icu_4.4.2.v20110823.jar
    Add classpath:  lib\jdi.jar
    Add classpath:  lib\jdimodel.jar
    Add classpath:  lib\org.eclipse.osgi_3.8.1.v20120830-144521.jar
    Launcher:   C:\Users\dregaladod\Downloads\Learning\processing-2.1.1\java\bin\javaw.exe
    Launcher args:  -classpath "lib;lib\pde.jar;core\library\core.jar;lib\jna.jar;lib\antlr.jar;lib\ant.jar;lib\ant-launcher.jar;lib\org-netbeans-swing-outline.jar;lib\com.ibm.icu_4.4.2.v20110823.jar;lib\jdi.jar;lib\jdimodel.jar;lib\org.eclipse.osgi_3.8.1.v20120830-144521.jar" processing.app.Base
    Args length:    277/32768 chars
    Exit code:  259
    

    Thanks

  • edited February 2014

    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:

    • Install Java yourself; use 32-bit or 64-bit (or both, the latest one will be the one seen on the path);
    • Export with Java embedded, so it should avoid entirely the issue. At the cost of a larger export... And you need the latest version of Processing.
  • edited March 2014

    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.
  • Anyone getting this same problem with Processing 2.2.1 on Windows? I see args.txt has been removed so can't change that...

Sign In or Register to comment.