Compile a Processing sketch into a library that can be used with an import. This is helpful to reduce the amount of Processing tabs in a project, specially for that bunch of classes that won't be changed and belong to a same conceptual group.
Translate Processing's .pde
files to .java
files, getting rid of all the Processing core functions by java equivalents (ex. sin()
to Math.sin()
) and/or import Processing classes (ex. PVector
).
Add package name at the beginning of every java class file.
Open Terminal and go to sketch's directory. Type the following command
javac -cp [processing_path]:[extra_libraries] -source 1.6 -target 1.6 -d . *.java