Difference between revisions of "Java Jar Processing Command-Line"
(Created page with "--~~~~ ---- <br /> <br /> <br /> <br /> <br /> =Running a Processing sketch/applet created with Eclipse on the command line= <br /> * make a new directory in your file system....") |
|||
Line 6: | Line 6: | ||
<br /> | <br /> | ||
<br /> | <br /> | ||
− | =Running a Processing sketch/applet created with Eclipse on the command line= | + | =Running a Processing sketch/applet created with Eclipse<br /><br />on the command line= |
<br /> | <br /> | ||
* make a new directory in your file system. Call it '''temp''' for example. | * make a new directory in your file system. Call it '''temp''' for example. |
Revision as of 11:18, 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 ./processing/core.jar *.java
- run the applet:
java -cp ./core.jar:. MVC1_viewer
- where MVC1_viewer is our main class, the one extending PApplet.