No.. It is not proper way. Refer the steps,
For Classpath reference: Right click on project in Eclipse -> Buildpath -> Configure Build path -> Java Build Path (left Pane) -> Libraries(Tab) -> Add External Jars -> Select your jar and select OK.
For Deployment Assembly: Right click on WAR in eclipse-> Buildpath -> Configure Build path -> Deployment Assembly (left Pane) -> Add -> External file system -> Add -> Select your jar -> Add -> Finish.
This is the proper way! Don't forget to remove environment variable. It is not required now.
Try this. Surely it will work. Try to use Maven, it will simplify you task.
Getting "java.lang.ClassNotFoundException: org.json.simple.parser.ParseException" while reading JSON object as input value of mapper
It was a trivial mistake.
I was not placing the jars in hadoop/lib folder. I had only placed them in the eclipse workspace.
P.S. I had first deleted this post but then I saw someone else ask a similar question in another forum. Hence I undeleted the question and answered it. Also I have edited the question to highlight the actual cause.