How to get Processing library path?

As per the title, how can I get the path of the Processing libraries folder from within my Processing app. Is there some default variable?

If you know the path of the sketchbook you can go there and the libraries folder should be there.
If you don’t know the location of the sketchbook you look it up at File-> Settings at the very top.

1 Like

I don’t think you can receive this within your app/ Sketch. Why would you?
Please explain

There is dataPath and sketchPath commands

isnt the library folder always supposed to be inside the sketchbook folder ?

Good idea.

We could try a relative path from sktechPath("")

It usually is, but not always.



I want to access some dll and dylib files in the libraries folder. To save the user from having to move these files around on their computer when they install the library.

I found a hacky solution

String res = System.getProperty("java.class.path");

Getting java.class.path then extracting out the libraries folder using string splitting.

1 Like

Alright, you will know that :slight_smile: Never had the opportunity to put the lib folder elsewhere :slight_smile:

As an aside: If you check for files in a folder, dont forget to look for the nasty invisible ones.
On a Mac, there’s the file .DS_Store for example.

Good luck