Export/embed : blank canvas

edited February 2014 in Using Processing

Hi all,

I have been trying to export/embed a small sketch I did. I tried Export as app (MacBook with OSX 10.6.8, Processing 2.1), copy the the web-export folder to my server and run it in a browser, upload it on OpenProcessing... any way I try, I end up with a blank canvas with nothing going on.

I do use libraries in the sketch: PDF and controlP5.

Without going into detail, is there something important I should know? What could easily make the "Export as app" fail, for instance? I'm trying to run the generated app on the same computer it's been generated on.

Tagged:

Answers

  • Maybe it's a silly assumption but, have you tried to export using Processing 2.0.3?
    Or the latest Processing 2.1.1? :-/

  • @GoToLoop: silly indeed, because these versions, as you know, doesn't support export to Web!

    @Moxl: applets doesn't support saving files to computer by default, so I guess the PDF library is the culprit. Either you remove this feature, or you try and sign your applet to enable it.

  • edited February 2014

    Silly indeed, because these versions, as you know, doesn't support export to Web!
    What could easily make the "Export as app" fail, for instance?

    It didn't seem to me @Moxl was requesting a Java Applet. I thought it was a local runnable app! :-??

    copy the the web-export folder to my server and run it in a browser, upload it on OpenProcessing...
    any way I try, I end up with a blank canvas.

    Forgot to read it carefully! #-o

    Better use Ye Olde Faithful Processing v1.5.1 anyways! ;)) ;

  • edited February 2014

    If you are not using P2D/P3D or OPENGL then you should try the Applet Maker tool which will export and sign the applet. Install through the PDE menu option "Add Tool". You can zip the 'applet' folder and upload to OpenProcessing (AFAIK still works with applets)

  • Keep in mind that the latest version of Java disables self-signed applets by default.

    And although the latest Processing doesn't support exporting to an applet directly, it's relatively straightforward to create an applet using the jars that are exported when you create an application.

  • edited April 2014

    Hello all, many thanks on your replies. Been very busy, I'll check it out and let you know what I'm (un)able to do.

    I just want to say, it's not important whether the app works online or locally, any solution would do fine for what I'm looking to do. Also, I can provide with the code in a ZIP if sb would care to take a look.

  • edited April 2014

    Okay, I checked this page and here's my question: when using libraries, I get 1 .jar per library used, plus 1 core.jar plus 1 itext.jar. Do I have to sign each .jar in the exported folder?

  • If you want to deploy as an applet, the answer is yes.

    The page you linked is a bit out of date, as self-signed applets are now disallowed by default as well. Most people are abandoning applets as a deployment option.

    You're also going to have issues with applet deployment because of the native libraries. You could use something like SvgExe (disclaimer: I wrote this, but it's also listed as an official Processing tool) to export it as a runnable jar instead of an applet.

  • @KevinWorkman

    Wow, I just looked at Jar Matey (previously SvgExe) - still valid and working?

    isn't that a complete breakthrough concerning the mess of applets are outdated and js doesn't really support (external) librarys?

    Can I use Jar Matey for Websites or for http://www.openprocessing.org ?

    thank you!

    Chrisir ;-)

  • Hey @Chrisir

    JarMatey is still valid and should still work with Processing.

    It's not really a breakthrough in that it won't allow you to deploy to the web like an applet or JavaScript would.

    What it does allow you to do is deploy as a single runnable jar file. That way you don't have to worry about creating multiple platform-specific executable versions.

    I would personally recommend trying your hardest to deploy using Processing.js, but if you're stuck with a Java library, then JarMatey can help you deploy as a single runnable jar.

    You can then upload that runnable jar to any file hosting website (like Static Void Games, heh heh). Does OpenProcessing support jar uploads?

Sign In or Register to comment.