I am making a GUI based project in java, and I have to add external jar file in it. I search it on the internet and every solution is talking about the library. But there is no library icon on project file list, no library option in project properties either.

Can anyone help me with it? how do I add jar file? I have NetBeans 11.0.

2 Answers 2


you can add it in the build script (build gradle). under the dependencies, just write the name of the jar file and press save. The gradle build will excecute and try to find the right jar file to add. Observe that the name have to be specific. With google you can find what name you need to write.

Example with this you will be able to connect to the database: compile 'mysql:mysql-connector-java:8.0.+'


I found a place for libraries in Tools -> Libraries. You can add a jar/folder there.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .