I thought there was an error in my code, but soon I found out all functions from the sound library would have the same error. I can’t even run any of the example files.
Then I tried to install the video library, and the same thing happened. Processing cannot run any of the example files. It seems like processing is having trouble accessing functions from the library. I saw many people on the internet having the same issue but nobody solved the problem yet. All the solutions of ClassNotFoundException I found on the internet are about JAVA, does it mean I have to edit processing’s code to solve the problem?
In fact installing a library is not enough in order to use it.
Since Processing uses the Java programming language, you need to explicitly import them with the language.
In the Processing editor, you can use the handy tool to import a library, go to Sketch -> Import a library -> Sound library
It will add those lines to your code:
import processing.sound.*;
Which imports all the classes, enums… of the sound library.
Thank you for trying to help.
I did import library. In the screenshot, it is on line 7.
and in all the example files they all imports library on the first line.
if I didn’t import library, it would be a different kind of error, such as