如何在NetBeans 12中添加Java库。

huangapple go评论76阅读模式
英文:

How to add java libraries in netbeans 12

问题

我正在尝试在Netbeans中导入Java库。对于旧版本,我在互联网上找到的解决方案是简单地转到项目属性,然后选择库。然而,在Netbeans 12中,我没有这样的选项。我的项目属性看起来像这样:
如何在NetBeans 12中添加Java库。

我如何为此项目导入库?
1: https://i.stack.imgur.com/0LKeJ.png

英文:

I am trying to import java libraries in Netbeans. For older versions, I found on the internet that the solution was to simply go to the project properties and then select libraries. However, in netbeans 12 I don't have an option like this. My project properties look like this:

如何在NetBeans 12中添加Java库。

How do I import libraries for this project?

答案1

得分: 0

我尝试从代码中导入一个库... 例如在你的“main”类中。

例如,你可以编写:
Database db = DatabaseBuilder.open(new File("test.mdb"));

之后,你可以尝试从项目设置中手动导入。

祝好!

英文:

I try to get an library importing from code.. for example in yout "main" class.

for example u can write
Database db = DatabaseBuilder.open(new File("test.mdb"));

Later you can try import manually from setting project.

regards!!

答案2

得分: 0

我无法说我对此了解很多,但对我而言,一个解决方案是使用 Ant 而不是 Maven 构建项目。然后库会出现在项目的属性中。

英文:

I can't say I understand much to it, but a solution for me was to build the project with Ant instead of Maven. Then the libraries appear in the properties of the project.

huangapple
  • 本文由 发表于 2020年9月19日 01:09:23
  • 转载请务必保留本文链接:https://go.coder-hub.com/63960052.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定