Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I import a library to a Java project in NetBeans?

I needed a class that could create polygons with Double or Float numbers, instead of int numbers. Well, I found it here, and here is the Jar file download. I extracted the Jar and added it to the libraries in NetBeans; but now, I don't know how to import the package to my project. If I type "import org.apache.batik.ext.awt.geom;", it says that the package does not exist. How can I import that package to my project? Thanks!

like image 675
jcasado94 Avatar asked Dec 07 '22 19:12

jcasado94


1 Answers

It's very easy.. you just expand the project tree in netbeans and right click to Libraries folder which is in the project.. and select the Add Jar/Folder option and choose your downloaded jar file.. nad click to open.. after that you can able to import these libraries..

prreview

like image 176
Dixit Wadhwani Avatar answered Dec 10 '22 12:12

Dixit Wadhwani