How to import a library into a Java project in NetBeans?

I need a class that could create polygons with double or floating numbers, not int numbers. I found it here and here is the download of the Jar file . I extracted the Jar and added it to the NetBeans libraries; but now I donโ€™t know how to import the package into my project. If I find "import org.apache.batik.ext.awt.geom;", it says that the package does not exist. How to import this package into my project? Thanks!

+4
source share
2 answers

It is very simple .. you just expand the project tree in netbeans and right-click the Libraries folder that is in the project .. and select the Add Jar / Folder option and select the downloaded jar .. file and click to open. after which you can import these libraries.

prreview

+11
source

Defining a library in Netbeans is not enough. You need to add the library to your project. Then your import will work.

+1
source

All Articles