have used eclipse to export the file and then got following error

hadoop-user$ bin/hadoop jar 
wordcountsmp/wordcount.jarorg.apache.hadoop.examples.WordCount input output


Exception in thread "main" java.io.IOException: Error opening job jar: 
wordcountsmp/wordcount.jarorg.apache.hadoop.examples.WordCount
        at org.apache.hadoop.util.RunJar.main(RunJar.java:90)
Caused by: java.util.zip.ZipException: error in opening zip file
        at java.util.zip.ZipFile.open(Native Method)
        at java.util.zip.ZipFile.<init>(ZipFile.java:127)
        at java.util.jar.JarFile.<init>(JarFile.java:135)
        at java.util.jar.JarFile.<init>(JarFile.java:72)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:88)


I tried following 
java -jar xf wordcountsmp/wordcount.jar

and got the error

Unable to access jar file xf

my jar file size is 5kb. I am feeling somehow eclipse export in macOS is not 
creating appropriate jar.




On Oct 5, 2011, at 8:16 PM, Brock Noland wrote:

> Hi,
> 
> On Wed, Oct 5, 2011 at 7:13 PM, Jignesh Patel <[email protected]> wrote:
>> 
>> 
>> I also found another problem if I directly export from eclipse as a jar
>> file then while trying javac -jar or hadoop -jar doesn't recognize that jar.
>> However same jar works well with windows.
> 
> 
> 
> Can you please share the error message? Note, the structure of the hadoop
> command is:
> 
> hadoop jar file.jar class.name
> 
> Note, no - in front of jar like `java -jar'
> 
> Brock

Reply via email to