I running Hadoop 2.7.0 on ubuntu 14.0.2 O.S., and I create wordcount.java with nano text editor which the source code is copy from [Apache Hadoop 2.7.0 Document](http://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduceTutorial.html).

After I compile wordcount.java with this command `javac -classpath hadoop-2.7.0-core.jar -d MyJava wordcount.java`, here are the error messages I got.

```
public class WordCount2 {
       ^
wordcount_v2.java:11: error: package org.apache.hadoop.conf does not exist
import org.apache.hadoop.conf.Configuration;
                             ^
wordcount_v2.java:12: error: package org.apache.hadoop.fs does not exist
import org.apache.hadoop.fs.Path;
                           ^
wordcount_v2.java:13: error: package org.apache.hadoop.io does not exist
import org.apache.hadoop.io.IntWritable;
                           ^
wordcount_v2.java:14: error: package org.apache.hadoop.io does not exist
import org.apache.hadoop.io.Text;
                           ^
wordcount_v2.java:15: error: package org.apache.hadoop.mapreduce does not exist
import org.apache.hadoop.mapreduce.Job;
                                  ^
wordcount_v2.java:16: error: package org.apache.hadoop.mapreduce does not exist
import org.apache.hadoop.mapreduce.Mapper;
                                  ^
wordcount_v2.java:17: error: package org.apache.hadoop.mapreduce does not exist
import org.apache.hadoop.mapreduce.Reducer;
                                  ^
wordcount_v2.java:18: error: package org.apache.hadoop.mapreduce.lib.input does not exist
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
                                            ^
wordcount_v2.java:19: error: package org.apache.hadoop.mapreduce.lib.output does not exist
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
                                             ^
wordcount_v2.java:20: error: package org.apache.hadoop.mapreduce does not exist
import org.apache.hadoop.mapreduce.Counter;
                                  ^
wordcount_v2.java:21: error: package org.apache.hadoop.util does not exist
import org.apache.hadoop.util.GenericOptionsParser;
                             ^
wordcount_v2.java:22: error: package org.apache.hadoop.util does not exist
import org.apache.hadoop.util.StringUtils;
                             ^
wordcount_v2.java:27: error: cannot find symbol
       extends Mapper<Object, Text, Text, IntWritable>{
               ^
  symbol:   class Mapper
  location: class WordCount2
wordcount_v2.java:27: error: cannot find symbol
       extends Mapper<Object, Text, Text, IntWritable>{
                              ^
  symbol:   class Text
  location: class WordCount2
wordcount_v2.java:27: error: cannot find symbol
       extends Mapper<Object, Text, Text, IntWritable>{
                                    ^
  symbol:   class Text
  location: class WordCount2
wordcount_v2.java:27: error: cannot find symbol
       extends Mapper<Object, Text, Text, IntWritable>{
                                          ^
  symbol:   class IntWritable
  location: class WordCount2
wordcount_v2.java:31: error: cannot find symbol
    private final static IntWritable one = new IntWritable(1);
                         ^
  symbol:   class IntWritable
  location: class TokenizerMapper
wordcount_v2.java:32: error: cannot find symbol
    private Text word = new Text();
            ^
  symbol:   class Text
  location: class TokenizerMapper
wordcount_v2.java:37: error: cannot find symbol
    private Configuration conf;
            ^
  symbol:   class Configuration
  location: class TokenizerMapper
wordcount_v2.java:41: error: cannot find symbol
    public void setup(Context context) throws IOException,
                      ^
  symbol:   class Context
  location: class TokenizerMapper
wordcount_v2.java:69: error: cannot find symbol
    public void map(Object key, Text value, Context context
                                ^
  symbol:   class Text
  location: class TokenizerMapper
wordcount_v2.java:69: error: cannot find symbol
    public void map(Object key, Text value, Context context
                                            ^
  symbol:   class Context
  location: class TokenizerMapper
wordcount_v2.java:88: error: cannot find symbol
       extends Reducer<Text,IntWritable,Text,IntWritable> {
               ^
  symbol:   class Reducer
  location: class WordCount2
wordcount_v2.java:88: error: cannot find symbol
       extends Reducer<Text,IntWritable,Text,IntWritable> {
                       ^
  symbol:   class Text
  location: class WordCount2
wordcount_v2.java:88: error: cannot find symbol
       extends Reducer<Text,IntWritable,Text,IntWritable> {
                            ^
  symbol:   class IntWritable
  location: class WordCount2
wordcount_v2.java:88: error: cannot find symbol
       extends Reducer<Text,IntWritable,Text,IntWritable> {
                                        ^
  symbol:   class Text
  location: class WordCount2
wordcount_v2.java:88: error: cannot find symbol
       extends Reducer<Text,IntWritable,Text,IntWritable> {
                                             ^
  symbol:   class IntWritable
  location: class WordCount2
wordcount_v2.java:89: error: cannot find symbol
    private IntWritable result = new IntWritable();
            ^
  symbol:   class IntWritable
  location: class IntSumReducer
wordcount_v2.java:91: error: cannot find symbol
    public void reduce(Text key, Iterable<IntWritable> values,
                       ^
  symbol:   class Text
  location: class IntSumReducer
wordcount_v2.java:91: error: cannot find symbol
    public void reduce(Text key, Iterable<IntWritable> values,
                                          ^
  symbol:   class IntWritable
  location: class IntSumReducer
wordcount_v2.java:92: error: cannot find symbol
                       Context context
                       ^
  symbol:   class Context
  location: class IntSumReducer
wordcount_v2.java:31: error: cannot find symbol
    private final static IntWritable one = new IntWritable(1);
                                               ^
  symbol:   class IntWritable
  location: class TokenizerMapper
wordcount_v2.java:32: error: cannot find symbol
    private Text word = new Text();
                            ^
  symbol:   class Text
  location: class TokenizerMapper
wordcount_v2.java:40: error: method does not override or implement a method from a supertype
    @Override
    ^
wordcount_v2.java:46: error: cannot find symbol
        URI[] patternsURIs = Job.getInstance(conf).getCacheFiles();
                             ^
  symbol:   variable Job
  location: class TokenizerMapper
wordcount_v2.java:48: error: cannot find symbol
          Path patternsPath = new Path(patternsURI.getPath());
          ^
  symbol:   class Path
  location: class TokenizerMapper
wordcount_v2.java:48: error: cannot find symbol
          Path patternsPath = new Path(patternsURI.getPath());
                                  ^
  symbol:   class Path
  location: class TokenizerMapper
wordcount_v2.java:64: error: cannot find symbol
            + StringUtils.stringifyException(ioe));
              ^
  symbol:   variable StringUtils
  location: class TokenizerMapper
wordcount_v2.java:68: error: method does not override or implement a method from a supertype
    @Override
    ^
wordcount_v2.java:80: error: cannot find symbol
        Counter counter = context.getCounter(CountersEnum.class.getName(),
        ^
  symbol:   class Counter
  location: class TokenizerMapper
wordcount_v2.java:89: error: cannot find symbol
    private IntWritable result = new IntWritable();
                                     ^
  symbol:   class IntWritable
  location: class IntSumReducer
wordcount_v2.java:95: error: cannot find symbol
      for (IntWritable val : values) {
           ^
  symbol:   class IntWritable
  location: class IntSumReducer
wordcount_v2.java:104: error: cannot find symbol
    Configuration conf = new Configuration();
    ^
  symbol:   class Configuration
  location: class WordCount2
wordcount_v2.java:104: error: cannot find symbol
    Configuration conf = new Configuration();
                             ^
  symbol:   class Configuration
  location: class WordCount2
wordcount_v2.java:105: error: cannot find symbol
    GenericOptionsParser optionParser = new GenericOptionsParser(conf, args);
    ^
  symbol:   class GenericOptionsParser
  location: class WordCount2
wordcount_v2.java:105: error: cannot find symbol
    GenericOptionsParser optionParser = new GenericOptionsParser(conf, args);
                                            ^
  symbol:   class GenericOptionsParser
  location: class WordCount2
wordcount_v2.java:111: error: cannot find symbol
    Job job = Job.getInstance(conf, "word count");
    ^
  symbol:   class Job
  location: class WordCount2
wordcount_v2.java:111: error: cannot find symbol
    Job job = Job.getInstance(conf, "word count");
              ^
  symbol:   variable Job
  location: class WordCount2
wordcount_v2.java:116: error: cannot find symbol
    job.setOutputKeyClass(Text.class);
                          ^
  symbol:   class Text
  location: class WordCount2
wordcount_v2.java:117: error: cannot find symbol
    job.setOutputValueClass(IntWritable.class);
                            ^
  symbol:   class IntWritable
  location: class WordCount2
wordcount_v2.java:122: error: cannot find symbol
        job.addCacheFile(new Path(remainingArgs[++i]).toUri());
                             ^
  symbol:   class Path
  location: class WordCount2
wordcount_v2.java:128: error: cannot find symbol
    FileInputFormat.addInputPath(job, new Path(otherArgs.get(0)));
                                          ^
  symbol:   class Path
  location: class WordCount2
wordcount_v2.java:128: error: cannot find symbol
    FileInputFormat.addInputPath(job, new Path(otherArgs.get(0)));
    ^
  symbol:   variable FileInputFormat
  location: class WordCount2
wordcount_v2.java:129: error: cannot find symbol
    FileOutputFormat.setOutputPath(job, new Path(otherArgs.get(1)));
                                            ^
  symbol:   class Path
  location: class WordCount2
wordcount_v2.java:129: error: cannot find symbol
    FileOutputFormat.setOutputPath(job, new Path(otherArgs.get(1)));
    ^
  symbol:   variable FileOutputFormat
  location: class WordCount2
56 errors

```

I am wondering how could that be happened. My JDK version is 1.8.0\_45