How to add Java library in Windows, Netbeans, and Geany

For Netbeans:

In the Projects window right-click on the name of the project that needs the library -> Properties -> The Project Properties window opens. In Categories tree select “Libraries” node -> On the right side of the Project Properties window press button “Add JAR/Folder” -> Select jars you need.

For Windows platform:

Typically you specify the classpath when you start your java program with the switch java -cp your.jar xxxx.java

But you can also permanently add it to your java installation by copying the jar to the default-java/jre/lib/ext folder.