just to also mention.. the inputs to the program are:
(1) /data/test_txt2 which is the location on hdfs where input file is
(2) /data/test_txt2/out which is the location where i need the optput file. The “out” folder does not exist

the code for which the jar file is made is same as wordcount. The jar file runs properly when i use “java -jar …” command in local file system.

If i use the jar file provided by hadoop, “hadoop-example-1.2.0.jar” and provide input in similar manner.. then things run properly!