I often find myself copying/pasting many classes from one Processing sketch to another and sometimes I change some of these, ending up with many different versions of the same objects.
Is there a centralized way to keep my common classes available for Processing? Should I use Java directly and deal with class paths?
One thing you might do is package your classes up as a library. There are a bunch of instructions here, and Google is always your best friend.
But basically, you would need to put your classes into packages and then export them as a .jar
file. Then you need either drag that .jar
file onto your Processing editor, or place them in the libraries directory structure. Either way allows you to use your classes just like any other Processing or Java library.
You might also consider creating a .pde
file of your classes and just copying it into your sketch directory, in addition to your main .pde
file. I believe that will allow you to use your classes in the main sketch file without worrying about them.
You could also just use tabs if you aren't already.