|
Create an empty Maven project
- Create an empty Maven project to import a Processing project into:
(please note it scrolls off to the right, make sure to highlight it all)
- The project name in this example is ExampleSketch.
- Copy the java classes into ExampleSketch\src\main\java.
Example pom.xml for a Processing project
- Replace the contents of new pom.xml with this:
(please note it scrolls off to the right, make sure to highlight it all)
|
Import into Eclipse
- Creating the maven 2 project makes it trivial to import the project into Eclipse (and other IDEs).
- From the project root run:
- In Eclipse select File > Import, choose Existing Projects into Workspace and click Next.
- Browse to the project root directory and click OK.
- The Projects box should have your project listed. (If not confirm that there is .classpath and .project file in your project root and that there isn't a project with the same name already in your workspace.)
- Click Finish.
Packaging code into Executable jar
- Finally maven 2 makes it easy to create a distributable executable jar.
- From the project root type:
- In the target directory there should be a file called ExampleSketch-1.0-SNAPSHOT-jar-with-dependencies.jar.
- To run the jar type:
Processing Windows without Java - expert
- The download does not include java and is about half the size.
- The expert download allows the use of Java libraries compiled against java 1.5 and 6.
- The startup is a little tricky, here is my startup script:
- The ^ is the Windows continuation character.
- The java 6 lives in C:\dev\tools\java\jdk1.6.0_07 on my system.
- Any additional jars in C:\dev\tools\processing-1.0.3-expert-Wrj4P5 should be added explicitly, like lib/some-lib.jar;
Labels:
None
