Well I got a running fatJar now because I forgot the all important
Code:public static void main(String args[]) {
PApplet.main(new String[] { "--present", "Test" });
}
Although I haven't been able to save images yet. And fatJar is not for applets is it?
I also want to get that ant working but I'm still doing something wrong.
Now on that P5Barbones page you state you have to get Apache Ant working in Eclipse. But when I installed Eclipse last week there were already tiny Ant icons running around the Eclipse interface. Does that mean the latest Eclipse comes with Ant?
Because when I run the P5Barebones Ant script it does do something. Here's the output:
Buildfile: C:\werk\java\p5-barebones\build.xml
init:
outputdebug:
clean:
loadjars:
build:
[mkdir] Created dir: C:\werk\java\p5-barebones\build
[javac] Compiling 1 source file to C:\werk\java\p5-barebones\build
BUILD FAILED
C:\werk\java\p5-barebones\build.xml:105: Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK.
It is currently set to "C:\Program Files\Java\jre1.6.0_03"
Hmmm... looking at the error again. I recal seeing on the sun fora that you indeed need JDK instead of JRE (I'm always clearer in the morning).
I just went to sun and installed JDK, but now it ends in a less clear error:
[javac] Compiling 1 source file to C:\werk\java\TestExport\build
BUILD FAILED
C:\werk\java\TestExport\build.xml:76: Error running javac.exe compiler
Maybe I need to restart my computer or something (kicking it might work).
-...-
No ... kicking it doesn't work either.
I noticed in the Eclipse console (in the single grey line above the output field) that it still tries to build with JRE (that should be JDK right?). I've setup the JAVA_HOME environment variable (in system properties) to the JDK root but somehow that doesn't work.
-...-
Read this thread: http://forum.java.sun.com/thread.jspa?threadID=440539&messageID=2519548
And got a succesfull build after adding the jdk tools.jar to the ant classpath: Run - External Tools - Open External Tools Dialog
yay