Java Jar Processing Command-Line
--D. Thiebaut (talk) 11:17, 4 December 2014 (EST)
Running a Processing sketch/applet created with Eclipse
on the command line
- make a new directory in your file system. Call it temp for example.
- copy all the java files creating your project to this directory
- add a main() method to the class that extends PApplet:
static public void main(String args[]) {
// use the name of this class in string below
PApplet.main( "MVC1_viewer" );
}
- make sure to replace MVC1_viewer by whatever your class name is.
- copy core.jar to this directory as well.
- compile the files:
javac -classpath ./processing/core.jar *.java
- run the applet:
java -cp ./core.jar:. MVC1_viewer
- where MVC1_viewer is our main class, the one extending PApplet.