如何将库导入 NetBeans 中的 Java 项目? [英] How can I import a library to a Java project in NetBeans?

查看:45
本文介绍了如何将库导入 NetBeans 中的 Java 项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一个类来创建带有双精度或浮点数的多边形,而不是整数.好吧,我在这里找到了它这里是 Jar 文件下载.我提取了 Jar 并将其添加到 NetBeans 中的库中;但是现在,我不知道如何将包导入到我的项目中.如果我输入import org.apache.batik.ext.awt.geom;",它说这个包不存在.如何将该包导入到我的项目中?谢谢!

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!

推荐答案

这很容易.. 你只需在 netbeans 中展开项目树并右键单击项目中的 Libraries 文件夹.. 然后选择 Add Jar/Folder选项并选择您下载的 jar 文件.. nad 点击打开.. 之后您可以导入这些库..

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..

这篇关于如何将库导入 NetBeans 中的 Java 项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆