JSON file not loaded when exporting as application

edited March 2014 in Using Processing

I am loading a JSON file from my processing sketch. This works fine, except when I export the sketch as an application. I also noted that the "data" folder is not packed with the exported application - so at first I thought that was the cause of the error. But even when copying the "data" folder to the same directory as the .app file, the JSON is still not loaded.

My code: moviedata = loadJSONArray("data.json");

Answers

  • You are not telling us what version of Processing you are using, on what system.

    On Windows 7, using Processing 2.1.1 (32-bit), I added a line like JSONObject json = loadJSONObject("Test.json"); to a test sketch, and I exported it.

    I got a data folder in the application.windows32 folder, and when I ran it, the file was loaded OK.

Sign In or Register to comment.