We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I've transferred a number of projects from a Windows Eclipse workspace to an OSX system. The projects run fine but I'm unable to Export frames/PDFs (Which worked fine on Windows).
Stack Trace snippet:
java.io.FileNotFoundException: /aaaaa.png (Permission denied)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.(FileOutputStream.java:213)
at java.io.FileOutputStream.(FileOutputStream.java:162)
at processing.core.PApplet.createOutput(PApplet.java:7636)
at processing.core.PImage.saveImageIO(PImage.java:3149)
at processing.core.PImage.save(PImage.java:3297)
at processing.core.PApplet.saveFrame(PApplet.java:4283)
at TestC.draw(TestC.java:17)
at processing.core.PApplet.handleDraw(PApplet.java:2386)
at processing.core.PGraphicsJava2D.requestDraw(PGraphicsJava2D.java:240)
at processing.core.PApplet.run(PApplet.java:2256)
at java.lang.Thread.run(Thread.java:745)
.... (etc)
Skeleton code creating the error:
import processing.core.PApplet;
@SuppressWarnings("serial") public class TestC extends PApplet {
public void setup() {
size(800, 800);
background(0);
noLoop();
}
public void draw() {
fill(255);
ellipse(width/2, height/2, 200, 200);
saveFrame("aaaaa.png");
}
}
I've set permissions to 777 for the eclipse & workspace directories and tried running Eclipse as root without success. saveFrame() works fine when building a sketch in Sublime Text 2.
Has anyone come across this before?
Answers
Dunno! Perhaps saveFrame() + dataPath("")? :-??
saveFrame(dataPath("aaaaa.png"));
No luck with dataPath :(
Hey nick. Windows and OSX are different for multiple reasons. What might work on windows might not work on OSX.
https://developer.apple.com/library/mac/documentation/General/Conceptual/MOSXAppProgrammingGuide/Introduction/Introduction.html
Try this it could help.
I've replaced the previous core jars (2.2.1) with those from the Processing 3 Pre-release and this has solved the issue.