Reputation: 7
I have downloaded common.codec
binary jar file. Now I want to use the class org.apache.commons.codec.binary.Base64
. But this folder contains four jar files namely common.codec-1.7.jar
,commons-codec-1.7-javadoc.jar
, commons-codec-1.7-sources
,commons-codec-1.7-tests
,commons-codec-1a.7-test-sources
. Now which path should I mention in class path? And I tried with all the jar file paths and imported in my program but failed. Please tell me where to place this downloaded jar file and how to use it in my code.
Upvotes: 1
Views: 5513
Reputation: 2294
You can use common.codec-1.7.jar
if you are using an IDE like
Eclipse:
1.Right-click your Project.
2.Select Properties.
3.On the left-hand side click java build path.
4.Under Compile tab - click Add External Jars button.
Netbeans :
1.Right-click your Project.
2.Select Properties.
3.On the left-hand side click Libraries.
4.Under Compile tab - click Add Jar/Folder button.
or if you directly compiling classes without IDE you can do as @S.R.I mentioned in comment.
Upvotes: 5