简体   繁体   English

在 Netbeans Java 和 Ant 中使用库

[英]Using Libraries In Netbeans Java With Ant

This is my first StackOverflow question, and I'm also a Grade 12 student, so apologies if it is a stupid one - feel free to let me know if it is, however, after numerous hours searching the internet, I can't find an answer to this.这是我的第一个 StackOverflow 问题,我也是 12 年级的学生,如果这是一个愚蠢的问题,请道歉 - 如果是,请随时告诉我,但是,经过数小时的互联网搜索,我找不到一个答案。
this is not homework help.这不是作业帮助。

Background背景

I am currently writing a program in Netbeans that will deal with large COVID datasets, and I'm looking to use some external libraries to make operations easier.我目前正在 Netbeans 中编写一个程序,该程序将处理大型 COVID 数据集,并且我希望使用一些外部库来简化操作。 The ones I've looked at are我看过的是
https://github.com/jtablesaw/tablesaw and https://github.com/nRo/DataFrame . https://github.com/jtablesaw/tablesawhttps://github.com/nRo/DataFrame
However, I have only ever used "Java with Ant", and both of these GitHub's only mention using the library through Maven dependencies in the pom.xml file.但是,我只使用过“Java with Ant”,而且这两个 GitHub 都只提到通过 pom.xml 文件中的 Maven 依赖项使用该库。 I have never used Maven, and I am very unfamiliar with Build Tools in general.我从来没有用过 Maven,而且我对 Build Tools 非常不熟悉。 As when I was introduced to Java, my teacher instructed me to use Java with Ant.当我被介绍给 Java 时,我的老师指示我使用 Java 和 Ant。 That being the case, any time I have used an external library before I have simply added the.jar files into my library folder and used import foo.bar;在这种情况下,任何时候在我简单地将.jar 文件添加到我的库文件夹并使用import foo.bar; or import foo.*;import foo.*; to use the libraries.使用库。

My question我的问题

Is there a way for me to use either of these libraries without switching build tools?有没有办法让我在不切换构建工具的情况下使用这些库中的任何一个? For example, download the source and make the.jar's in a way that isn't overly tedious, so that I can use the libraries the same way I am used to?例如,下载源代码并以一种不太乏味的方式制作.jar,以便我可以像以前一样使用这些库? Or, perhaps something I'm missing that allows me to download them in that format?或者,也许我错过了一些允许我以这种格式下载它们的东西? If not, seeing as almost every Github library I find instructs me to use it through Maven dependency, should I stop using Java with Ant altogether and start learning how to write programs using Maven? If not, seeing as almost every Github library I find instructs me to use it through Maven dependency, should I stop using Java with Ant altogether and start learning how to write programs using Maven?

Any insight is greatly appreciated.非常感谢任何见解。 If this has already been answered, feel free to link the answer and sorry for cluttering up the forum.如果已经回答了这个问题,请随时链接答案,很抱歉弄乱了论坛。 Thanks.谢谢。

From one of the Maven websites you can download the libraries and use them as normal.从 Maven 网站之一,您可以下载库并正常使用它们。 First find the artifact page, for example using mvnrepository.com as shown below, or you could use the https://search.maven.org/ :首先找到工件页面,例如使用 mvnrepository.com 如下所示,或者您可以使用https://search.maven.org/

Find the relevant page by searching for the artifact, then once there you can choose the version:通过搜索工件 找到相关页面,然后在那里您可以选择版本: 在此处输入图像描述

Then click on "View all" to see the artifact jar files:然后点击“查看全部”查看神器jar文件: 在此处输入图像描述

Then lastly right-click the file you need and choose save:然后最后右键单击您需要的文件并选择保存: 在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM