r/javahelp • • Nov 05 '18

Handling libraries in Java (confused python programmer)

I usually code in python where downloading libraries is conveniently handled using pip or anaconda. Installing libraries is not more complicated than running a single command in the terminal.

However just starting out with libraries in Java I find myself bewildered on how to download libraries in a convenient way... So far I've tried just downloading JAR-files from my browser manually but that isn't very efficient. I've tried looking into Maven but found it a bit confusing and I'm not even sure that's where I should be looking?

Any help is appreciated!

17 Upvotes

15 comments sorted by

View all comments

14

u/[deleted] Nov 05 '18

Maven is great. I'm sure I'll get flamed for this but I just use maven with eclipse and the plugin 'Maven integration for eclipse'. Find the project you want to manage with maven, right click, convert to maven project. It should create your pom.xml file for you. Then past in the dependency or use the dependencies tab to select what you want. Right click the project and 'update maven dependencies' and you should have your lib now.

4

u/nutrecht Lead Software Engineer / EU / 20+ YXP Nov 06 '18

Maven is great. I'm sure I'll get flamed for this

Nah. Maven still has like a 80% share. There's a few people who keep shouting Gradle is better but they're a vocal minority. In a previous project we actually decided to migrate our 40 or so services from Gradle to Maven.

2

u/[deleted] Nov 06 '18

Ha I meant for not using maven on the command line like a "real programmer"