Manually import Java library, JDSP, and cannot use JDSP built-in functions

JDSP website states:

JDSP is written purely in Java. It has dependencies on 3 core libraries: Apache Commons Math, IIRJ and SSJ , all of which are also open source projects.

You need (at least for you sketch) these additional JAR files in your code folder in your sketch:

I only needed the last import for your example:

//import com.github.psambit9791.jdsp.misc.*;
//import com.github.psambit9791.jdsp.io.*;
//import com.github.psambit9791.jdsp.speech.*;
//import com.github.psambit9791.jdsp.splines.*;
//import com.github.psambit9791.jdsp.filter.*;
//import com.github.psambit9791.jdsp.filter.adaptive.*;
//import com.github.psambit9791.jdsp.windows.*;
//import com.github.psambit9791.jdsp.transform.*;
//import com.github.psambit9791.jdsp.signal.*;
//import com.github.psambit9791.jdsp.signal.peaks.*;

import com.github.psambit9791.jdsp.filter.Butterworth; // Specific import for Butterworth

And voila!

You will have to add code to plot results:

This was with some modifications to your code:

I will leave it with you to find those jar files in here (I used these) or links on JDSP site:

This was a fun and worthwhile!

I learned a lot!

:)