How to Install Java Libraries

Eclipse IDERecently I received a bunch of emails asking how to install java libraries. So, in this tutorial I’ll show you how.

Since I use Eclipse in all of my tutorials, I’ll show you how to install java libraries with Eclipse. I use Eclipse because it is free and looks the same on every operating system.

Specifically I’ll show you how to install the very popular Apache Commons Java Library.

Get Apache Commons Java Library

This is real simple. Go to this page Apache Commonsย and download and unzip thisย

Install Java Library in Eclipse

Here you’ll see a series of images that will walk you through the installation of the Apache Commons library. As you can see, this series of steps will work for any Java Library.

Of course you need to have Eclipse. I use the version of Eclipse namedย Eclipse IDE for Java Developers. Now open Eclipse and follow what you see in the pictures below.

Right click on the top most folder in the Eclipse Package Explorer and create a new folder

Install Java Library

Create a new folder named lib as you see below.

Install Java Library 2

Right click on the top most folder again in package explorer and click import.

 Install Java Library 3

Select General and then File System.

Install Java Library 4

Browse to the location for your Java jar files and select them. Click Finish

Install Java Library 5

Right click on the top most folder again in package explorer and click properties.

Install Java Library 6

Click Libraries, Add Jars, Select the jar files and hit OK.


Now if you want to use the Apache Commons library for example, just add the following line of code to your code import org.apache.commons.lang3.*;

That’s it! If you want to learn java, I have a pretty nice Java Video Tutorial.

I hope that helped you out. If you have any questions leave them below.

If you like videos like this tell Google [googleplusone]
To make me extra happy, feel free to share it

Till Next Time

Think Tank

25 Responses to “How to Install Java Libraries”

  1. matt says:

    Sorry… even entering comments produces errors…

    I recently downloaded Eclipse ee for java developers. I am only using 1.6. I dont see a need to hassle with 1.7 due to my newness of programming.

    When I go to… File>New, the list is blank and shows

    I cant assume i have done anything wrong because I just installed it and have not messed with anything.

    Thank you in advance,

    • admin says:

      Try reinstalling eclipse Indigo. The Juno version (the newest) seems to be buggy. Just search for Eclipse Indigo and you’ll find it. I hope that helps

  2. sarah says:

    Hi there — Thanks very much for this.

    How do you determine what to include in the import line? In your example, you have:
    import org.apache.commons.lang3.*;

    For other libraries, how would you figure that out?


  3. Nicky says:

    hello there, thanks for your nice turorials, I found all of them great!
    I wanted to install java library in Netbeans, since I work in Netbeans not Eclipise. Can I just do the same way as you taught here? Thanks again.

  4. Jaminyah says:

    There are two recommendations that I would like to make to your great set of instructions:
    1. At the very beginning: “Create a new Java Project. Name it Java Code.”

    2. Just before the import instructions, “unzip the file”.


  5. Jaminyah says:

    There are to suggestions that I would like to make to your great set of instructions.

    1. At the beginning add, “Create a new Java project in Eclipse. Call it Java Code.”

    2. Before the import instructions add, “unzip the file


  6. Kai Wong says:

    This is amazing! Your tutorials are clear and more than comprehensible! I’m still mulling over the underrated views you get in YouTube.

    • Derek Banas says:

      Thank you very much ๐Ÿ™‚ I don’t care much about views. There are many things that I do that cause me to lose views. For example if I made a bunch of 5 minute videos instead of 25 minute videos that are edited down from 45 minute videos I could quadruple my view count. That doesn’t matter to me. I just do this to help and I don’t care about money

  7. Jared says:

    I can find that folder!
    Help I don’t know where to look.

  8. Abhi says:

    Hi Derek, I add the the jar files to the library but every time I try to import the Apache Commons library it says that The import org.apache cannot be resolved. Am I suppose to add the files to the System Library itself?

  9. Noumenon72 says:

    For anyone who gets a NoClassDefFoundError when trying to use these, do this.

  10. Ismail says:

    Thank you very much!

  11. najadh says:

    Thanks mate!!!

    I was hoping to start learning java
    and i found a good tutor. ๐Ÿ™‚

Leave a Reply

Your email address will not be published.