Hadoop Java Error : Exception in thread “main” java.lang.NoClassDefFoundError: WordCount (wrong name: org/myorg/WordCount)

前端 未结 6 2470
别那么骄傲
别那么骄傲 2021-02-14 10:42

I am new to hadoop. I followed the maichel-noll tutorial to set up hadoop in single node.I tried running WordCount program. This is the code I used:

import java.         


        
6条回答
  •  醉酒成梦
    2021-02-14 11:02

    try explicitly including the nested classes(i.e. TokenizerMapper and IntSumReducer) in you jar file. Here is how I did it:

    jar cvf WordCount.jar WordCount.class WordCount\$TokenizerMapper.class WordCount\$IntSumReducer.class
    

提交回复
热议问题