Difference between revisions of "Java Jar Processing Command-Line"
(→Running a Processing sketch/applet created with Eclipseon the command line) |
|||
Line 24: | Line 24: | ||
* compile the files: | * compile the files: | ||
− | javac -classpath . | + | javac -classpath ./core.jar *.java |
* run the applet: | * run the applet: |
Latest revision as of 11:20, 4 December 2014
--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 ./core.jar *.java
- run the applet:
java -cp ./core.jar:. MVC1_viewer
- where MVC1_viewer is our main class, the one extending PApplet.