Hey
A newbie to Eclipse and Java...can anyone tell me how could I install the Apache common lang 2.5 in Eclipse?
http://commons.apache.org/lang/download_lang.cgi
Thanks!
Hey
A newbie to Eclipse and Java...can anyone tell me how could I install the Apache common lang 2.5 in Eclipse?
http://commons.apache.org/lang/download_lang.cgi
Thanks!
You could create a User Library using Apache Commons Lang in Eclipse. User library is a set of jars (these jars can be stored wherever you like). Once defined, user library can be reused in various projects.
You can find more information how to do this for example here (in an accepted answer).
After creating a user library you can add it to your projects just as any other library (Project Properties -> Java Build Path -> Libraries -> Add library -> User library -> Next -> choose your library).
Detailed steps -
0) Download commons-lang-2.5-bin.zip from Apache Commons - Lang Downloads http://commons.apache.org/lang/download_lang.cgi Expand the archive in a directory (eg. \projects\commons-lang-2.5)
In Eclipse -
1). Put the library in the Java build path
Eclipse -> Preferences: Java - Build path - User Libraries push the "New..." button, and in the "User library name:" enter 'appache-commons-lang'.
Click to select "appache-commons-lang" in the "Defined user libraries" list and then click on the "Add JARs..." button and browse for commons-lang-2.5.jar (in the folder saved earlier) and select it.
In the "Defined user libraries", under commons-lang-2.5.jar need to have "Source attachment" and "Javadoc location" specified. For each of them, select it, then push "Edit..." , then "External file" and browse for the corresponding jar (commons-lang-2.5-sources.jar and commons-lang-2.5-javadoc.jar)
2) In the project add this user library In the Package Explorer right-click on the project name, go to Properties, and select the Libraries tab; click the "Add Library..." button, from the list select "User library" , "Next", mark [x] appache-commons-lang, and click "Finish"
You could also do it on a per project basis
Right click your project -> buildpath -> configure buildpath -> add libraries -> add jar -> select the jar you want to add as dependency to your project
(or use maven which does it all for you on creating the eclipse project)