Error while running Processing with Maven

Have a look at libp5x. It might work for you. Some Gradle examples at GitHub - codelerity/libp5x-examples: Examples using libp5x Probably won’t work with JDK 19 unless you upgrade the Gradle version though.