Search code examples
javamavenantlibrariestablesaw

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.
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. The ones I've looked at are
https://github.com/jtablesaw/tablesaw and https://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. I have never used Maven, and I am very unfamiliar with Build Tools in general. As when I was introduced to Java, my teacher instructed me to use Java with 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; or 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? 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?

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.


Solution

  • From one of the Maven websites you can download the libraries and use them as normal. First find the artifact page, for example using mvnrepository.com as shown below, or you could use the https://search.maven.org/:

    Find the relevant page by searching for the artifact, then once there you can choose the version: enter image description here

    Then click on "View all" to see the artifact jar files: enter image description here

    Then lastly right-click the file you need and choose save: enter image description here