Adjusting a Processing library?

I need to adjust the .net library and did so in the src folder. But the changes i made do not do anything.

Do i need to recompile/build the library before changes take effect or should a simple restart of processing do it?

If i need to re-build the library, is there a noob tutorial for it?

1 Like

Anyone? I could really use an answer…

The source code for the Network library lives here.

You’d want to check out that repo, import it into your favorite IDE, and modify the code there.

Then, instructions for building the code are here.

1 Like

Just to really underscore the point on this useful question:

The src folder is not directly used by Processing, at all. The compiled .jar file is used.

To change a jar, you must recompile the source. For that, you are looking at setting up a project with the source in an IDE such as Eclipse or IntelliJ, altering the source (which is written in Java, not Processing).

The you recompile with your changes and install or reinstall the library or component into Processing. You may need to restart Processing to see the newly added resource.

If you want to locally fork a library and develop your own flavor, the easiest thing to do is fork the github repository with the library and modify the to give different identifying information so that it won’t conflict.


Thank you guys! Is one of you setup to compile with eclipse or intelliJ? There is only one single line i have to change in the src. Installing an entire IDE looks like overkill for my use. Especually since i have no clue on how to use these IDE’s.

If one of you is able to compile it for me, i would be so gratefull. I can send you the files.

Well, I believe you could extract the net files

…and then try to rebuild that jar from the command line with – either directly with javac, or with ant

…and then put that net2.jar library in the Processing contributed libraries area and call it by its package name from a sketch rather than calling the built-in net.

I haven’t done this, so I may be missing some details.

However, I honestly don’t think that would be easier than following the setup instructions on Eclipse. It actually might be significantly harder, as both the Processing repo and the Processing Library Template repo have Eclipse configured to do a lot of really complicated building for you, including the integration of the net library with other components and where to put the outputs.

Also, more generally, one often thinks it is “one change, one time,” but in my experience it almost never is – especially when that proposed change is untested. Being set up to make further changes really helps. An alternative is hiring a developer to do it for you, and being able to have them test it and go back to them if it doesn’t work. I personally prefer DIY.

1 Like

The changes i have to make are accually tested by someone else. I found the sollution to my problem online.

But i will look into installing eclipse. I tried ant before but without succes.

Can the person who tested it for you just give you the jar that they tested?

The nice thing about Eclipse is that it includes and wraps up Ant for you – and gives you a little button with an ant on it to click…

Yes that is what i wanted to do. But i can not contact this person, because the processing forum doesn’t take new members until they moved to a new website. So there is no way for me to contact that person.

But i will go the eclipse way. It sounds less invasive than i thought.