Search code examples
javacompiler-errorsprocessing

How to create a processing library from pde files


I have this nice set of processing .pde files that together would make a good library. I don't want to use Eclipse or some other GUI editor. I'm ok with Ant if need be.

To create a processing library, I need to put a jar file in the processing libraries folder (with some special naming conventions). I can create a .java files from the .pde files by exporting the application. If I modify these a bit, I can compile them using javac, but it needs to import processing.core.*;. I point it at my own processing core.jar, but at this point I get a

class file has wrong version

It seems processings core.jar was created for a different version of javac then I'm currently running.

So here's the question: am I totally off track and is there a better way to do this, or should I continue and download the Processing source code and compile it myself, in order to be compatible with my javac ?


Solution

  • I highly recommend using Eclipse or Intellij rather than the Processing editor. The Processing editor is great for writing sketches, but if you're building a library, you should probably use a more advanced IDE.

    But it sounds like you're using an old version of Java and should upgrade. I'm pretty sure Processing is compatible with Java 8, which means you're using Java 7 or older. Java 7 has been end of life for quite some time now, and you should upgrade anyway.

    To find out which Java you're using, try this command:

    javac -version