Akhil,
Just to add to what Sonal sai.
If you are using maven in your application you could run mvn assembly:assembly 
- this will create one jar comprising of all the jars.


Ankit

-----Original Message-----
From: Sonal Goyal [mailto:[email protected]] 
Sent: Friday, May 07, 2010 8:48 AM
To: [email protected]
Subject: Re: How to add external jar file while running a hadoop program

Akhil,

For the rejar to work, the to be included jar has to be in the lib folder of
the main jar.

Thanks and Regards,
Sonal
www.meghsoft.com


On Fri, May 7, 2010 at 3:31 PM, akhil1988 <[email protected]> wrote:

>
> You need to jar the stanford-parser with your ep.jar
> For this you canunjar the stanford-parser.jar using
>
> jar -xvf stan...jar
>
> jar -cvf ep.jar stanford/directory ep/
>
>
>
>
>
>
> harshira wrote:
> >
> > am new to hadoop.
> >
> > I have a file Wordcount.java which refers hadoop.jar and
> > stanford-parser.jar
> >
> > I am running the following commnad
> >
> > javac -classpath .:hadoop-0.20.1-core.jar:stanford-parser.jar -d ep
> > WordCount.java
> >
> > jar cvf ep.jar -C ep .
> >
> > bin/hadoop jar ep.jar WordCount gutenburg gutenburg1
> >
> > After executing i am getting the following error:
> >
> > lang.ClassNotFoundException:
> > edu.stanford.nlp.parser.lexparser.LexicalizedParser
> >
> > The class is in stanford-parser.jar ...
> > I guess that different processes doesnt access this jar file . so how can
> > this be acheived.
> >
> > Thanks
> > Harshit
> >
>
> --
> View this message in context:
> http://old.nabble.com/How-to-add-external-jar-file-while-running-a-hadoop-program-tp28481933p28484219.html
> Sent from the Hadoop core-user mailing list archive at Nabble.com.
>
>

Reply via email to