1

My programming colleague sent me a Java project but it's using some apache libraries:

import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.CommandLineParser;
import org.apache.commons.cli.DefaultParser;
...

How do I install this libraries so I can compile the project?

J-Alex
  • 6,881
  • 10
  • 46
  • 64

1 Answers1

5

Option 1:

File > Project Structure > Libraries > + > from maven > search for commons-cli

Option 2:

Download jar and go to File > Project Structure > Libraries > + > from Java > select your jar file

Option 3:

Setup your project with some build tool (Maven, Gradle and etc.) and grab your dependency from here

J-Alex
  • 6,881
  • 10
  • 46
  • 64