I am consistently obtaining the same two errors when attempting to compile the WordCount.java source code provided here. I am working with Ubuntu Linux. I have searched vastly and everyone seems to conclude that changing the HADOOP_CLASSPATH environment variable as follows should do the trick but I still obtain the error. I have also included these environment variable definitions inside the haddop_env.sh file.
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export PATH=${JAVA_HOME}/bin:${PATH}
export HADOOP_CLASSPATH=${JAVA_HOME}/lib/tools.jar
However, it appears even with those variables set, I still obtain the following two errors after running the following compilation command:
bin/hadoop com.sun.tools.javac.Main WordCount.java
I obtain the errors:
HADOOP_COM.SUN.TOOLS.JAVAC.MAIN_USER: invalid variable name
HADOOP_COM.SUN.TOOLS.JAVAC.MAIN_OPTS: invalid variable name
I would appreciate any insight.