1

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.

  • Ant integrates with [Ivy](https://ant.apache.org/ivy/), which can take a lot of the pain out of managing libraries, if you want to stick with Ant - especially when you have libraries which depend on other libraries... The Maven Repository pages generally include the Ant dependency you will need (for example see the 4th tab labelled "Ivy" on [this page](https://mvnrepository.com/artifact/org.apache.commons/commons-lang3/3.12.0)). – andrewJames May 25 '21 at 23:40
  • 1
    Or you can make the switch to Maven (or Gradle). These days, I think many tutorials and demos assume Maven. Ant/Ivy seems much less common. – andrewJames May 25 '21 at 23:41

1 Answers1

1

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

sorifiend
  • 5,927
  • 1
  • 28
  • 45
  • Thank you very much for your reply! However, I've unfortunately run into an issue. I tried to write some simple code found at jtablesaw.github.io/tablesaw/gettingstarted.html, and I've put the .jar in the libraries folder, however, when I run the program I get `java.lang.NoClassDefFoundError: it/unimi/dsi/fastutil/ints/IntIterable.` Upon investigating the .class files in the .jar's packages I saw many `import it.unimi.dsi.fastutil.(something);` lines, so I am assuming this is another library it is dependant on. I'm assuming there's more missing libraries. Is there a feasible way to solve this? – confusedkingbread May 26 '21 at 02:18
  • 1
    You could download all the depenancies manually, or you can create a maven project and get it to download all the files for you, then you can copy them across. Otherwise see the comment to your question about using Ivy. – sorifiend May 26 '21 at 02:34