At many situations we must need to add external libraries to our
projects to solve a problem or to add some extra functionality.
By adding jar files.
(d). A dialog box having name Download Library From Maven Repository will open. In Editable Combobox enter details about your jar file/s in shown pattern and click on search icon:
Intellij IDE offers two
ways to add external libraries to your project
- By adding Jar Files.
- Using maven dependency code
By adding jar files.
For this you will need that external jar file/s in your
system.
Now follow these steps:-
(b). A dialog box having name Project Structure will open
(c). Click on Libraries (In left side), then click on green plus Icon and then click on Java
(d). A dialog box having name Select Library Files will open. Navigate through Folders and select jar file/s you want to add in your project. Then click OK.
Your jar files are now added to your project.
Using maven dependency code.
For this you do not necessarily need those external jar file/s in your system. But your computer must be connected to internet.
Now follow these steps:-
(a). Click on File, and click on Project Structures…
(b). A dialog box having name Project Structure will open
(c). Click on Libraries (In left side), then click on green plus Icon and then click on From maven…
(d). A dialog box having name Download Library From Maven Repository will open. In Editable Combobox enter details about your jar file/s in shown pattern and click on search icon:
groupId:artifactId:version
for example
org.glassfish.jersey.core:jersey-client:2.0
Combobox will be populated. Select the version of jar you need and then click OK.
jar file/s will be download in specified folder.
You can use these jar files in your project now.
Comments
Post a Comment