Difference between revisions of "Java Jar Processing Command-Line"

From dftwiki3
Jump to: navigation, search
(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....")
 
(Running a Processing sketch/applet created with Eclipseon the command line)
 
(One intermediate revision by the same user not shown)
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.
Line 24: Line 24:
 
* compile the files:
 
* compile the files:
 
   
 
   
  javac -classpath ./processing/core.jar *.java
+
  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.