What is the correct way to add external Jars to IntelliJ IDEA Project?

0 votes
I want to configure IntelliJ IDEA to include my dependency jar files. Is there any way to connect external jars to the IntelliJ iDEA project?
Jun 22, 2018 in Java by Daisy
• 8,110 points
65,945 views

11 answers to this question.

0 votes
  1. Click File from the toolbar
  2. Project Structure (CTRL + SHIFT + ALT + S on Windows/Linux, ⌘ + ; on Mac OS X)
  3. Select Modules at the left panel
  4. Dependencies tab
  5. '+' → JARs or directories
answered Jun 25, 2018 by Parth
• 4,630 points
0 votes

To import jar file in your Eclipse IDE, follow the steps given below.

  1. Right click on your project
  2. Select Build Path
  3. Click on Configure Build Path
  4. Click on Libraries and select Add External JARs
  5. Select the jar file from the required folder
  6. Click and Apply and OK
answered Dec 10, 2018 by Samarth
I think the question was about Eclipse.

Hey, @There,

Do you want any more information about the above-given solution? Yes, it is about Eclipse.

0 votes

You can add a jar file in Eclipse by: 
right-clicking on the Project → Build Path → Configure Build Path. 
Under Libraries tab, click Add Jars or Add External JARs and give the Jar.

Simple as that.

answered Dec 10, 2018 by Nitesh
0 votes

The best way is to add the jar to your project is as follows:

  1. Create a folder called lib in your project folder.

  2. copy all the jar files you need to this folder .

  3. Refresh your project in eclipse.

  4. Select all the jar files, then right click on one of them and select Build Path -> Add to Build Path

answered Dec 10, 2018 by Shuvodip
0 votes

Eclipse -> Preferences -> Java -> Build Path -> User Libraries -> New(Name it) -> Add external Jars

Done.

answered Dec 10, 2018 by Timsberg
0 votes

Right click on your project and choose Build Path -> Add Library

Then configure the build path and you are good to go.

answered Dec 10, 2018 by Ritesh
0 votes
In eclipse

right click on your project

Click build path

Add external libraries

You are good to go.
answered Dec 10, 2018 by Harpreet
0 votes

Go to your project right click and select build path 

then configure path and add your jar files in bin and you are good to go

answered Dec 10, 2018 by Sumitra
0 votes
answered Dec 10, 2018 by Rulutima
0 votes

The best way is to add the jar to your project is as follows:

  1. Create a folder called lib in your project folder.

  2. copy all the jar files you need to this folder.

  3. Select all the jar files, then right click on one of them and select Build Path -> Add to Build Path

answered Dec 10, 2018 by Nabarupa
0 votes
You can also create a "lib" folder in the root of your project. Put you jar library in.

And then boot up intellij, right click on your java, and select "Use as library".

Just did this to my own project.
answered Jul 17 by Zeenu

Related Questions In Java

0 votes
2 answers

what is the best way to convert an ArrayList to a String

You could probably use the Joiner class ...READ MORE

answered Aug 19, 2019 in Java by Sirajul
• 57,750 points
161 views
0 votes
1 answer

What is the simplest way to read JSON from a URL in java

Read json from url use url.openStream() and read contents ...READ MORE

answered Jun 13, 2018 in Java by samarth295
• 2,200 points
1,870 views
0 votes
2 answers

What is the easiest way to iterate through the characters of a string in Java?

There are two approaches to this: for(int i ...READ MORE

answered Aug 19, 2019 in Java by Sirajul
• 57,750 points
302 views
0 votes
2 answers

In Java, what is the best way to determine the size of an object?

I happened to find a java class "jdk.nashorn.internal.ir.debug.ObjectSizeCalculator", ...READ MORE

answered Aug 19, 2019 in Java by Sirajul
• 57,750 points
2,406 views
0 votes
1 answer

Retrieving the path of a running jar file

Its quite simple. Try using the below ...READ MORE

answered May 25, 2018 in Java by geek.erkami
• 2,680 points
5,457 views
0 votes
1 answer

How to run the JAR files in windows?

Following are the steps to run the ...READ MORE

answered May 28, 2018 in Java by Parth
• 4,630 points
223 views
0 votes
2 answers

How can we add the local JAR files to the Maven Project in Java?

Firstly I would like to give credit ...READ MORE

answered Nov 5, 2018 in Java by Sushmita
• 6,890 points
1,904 views
0 votes
1 answer

How to run a JAR file in Java?

The command given below will help you ...READ MORE

answered Jun 1, 2018 in Java by Parth
• 4,630 points
3,841 views
0 votes
2 answers

What is the difference between = and equals()?

The equals() method compares the "value" inside String instances ...READ MORE

answered Aug 13, 2018 in Java by Daisy
• 8,110 points
202 views
0 votes
1 answer

What is the difference between package private, public, protected?

Modifier Class Package Subclass World Public Y Y Y Y Protected Y Y Y N No modifier Y Y N N private Y N N N   Public: Any package, any class accessibility is ...READ MORE

answered May 24, 2018 in Java by Parth
• 4,630 points
539 views