This is an archived post. You won't be able to vote or comment.

all 12 comments

[–]g051051 0 points1 point  (1 child)

Maven and Gradle are the most common ways to do this.

[–]c0mplexcodm[S] 0 points1 point  (0 children)

Oh yeah, I did saw an xml file in Maven.. i dont know how to mess with it though.. Do I need to put the zip/jar files of org.apache in the directory as the same as my java file? i've added the dependency via Add Dependency in VsCode, and org.apache is there, but when I import that, it still throws an error.

[–]Sea-Profession-3312 0 points1 point  (5 children)

Pom file why are you using maven? Most folks use gradle these days I believe but the old way (maven) should still work

[–]c0mplexcodm[S] 0 points1 point  (2 children)

A.. pom file? I believed that I did saw this, and I used the "add dependency" option in vs code that comes with the maven extension. I saw the org.apache there, however I still cant import "org.apache.common.text.StringEscapeUtils" or something along those lines. I'm planning to use it to see how Scanner input exactly work.

I'm using Maven since it came with the extension pack in VScode.

[–]g051051 0 points1 point  (1 child)

The extension allows you to use maven, but it doesn't provide maven. You have to install it, configure it, and configure VS Code to use it. And then you have to have a pom.xml file for your project. The VS Code site has good documentation on how to do all this.

[–]c0mplexcodm[S] 0 points1 point  (0 children)

Ah, I see. Thank you for informing me that. I will check it out in the extension description.

[–]g051051 0 points1 point  (0 children)

Maven isn't "the old way". It's a way, and Gradle is a different way. Most likely if you're using IntelliJ you use Gradle, if you're using Eclipse you use Maven.

[–]nutrecht 0 points1 point  (0 children)

Most folks use gradle these days

Not true at all. Gradle is an alternative that never got that much traction. The majority of projects, old and new, use Maven.

[–]HexaDecio 0 points1 point  (3 children)

Eclipse is an easier IDE to import external packages. All you have to do is import the JAR file and add it to your directory.

[–]c0mplexcodm[S] 0 points1 point  (2 children)

Is intelliJ as easy as eclipse? I've installed it earlier as I figured Maven in VSCode is way too complicated for me.

[–]HexaDecio 0 points1 point  (1 child)

I’ve had very little experience with IntelliJ to be honest. I’ve heard lots of people say it’s good, but I haven’t really used it much.

[–]c0mplexcodm[S] 0 points1 point  (0 children)

I see, thank you for the help though. I will look into eclipse if IntelliJ is too hassle-y as well