英文:
How to add java libraries in netbeans 12
问题
我正在尝试在Netbeans中导入Java库。对于旧版本,我在互联网上找到的解决方案是简单地转到项目属性,然后选择库。然而,在Netbeans 12中,我没有这样的选项。我的项目属性看起来像这样:
我如何为此项目导入库?
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:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论