kiwenlau / hadoop-cluster-docker

Run Hadoop Custer within Docker Containers
Apache License 2.0
1.8k stars 864 forks source link

Could not find or load main class com.sun.tools.javac.Main #53

Open djy0215 opened 6 years ago

djy0215 commented 6 years ago

when running my own mapreduce job, I met that problem. And I have changed the hadoop-env.sh from jdk7 to jdk8
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64

Below is the error message: root@hadoop-master:~/src# hadoop com.sun.tools.javac.Main *.java Error: Could not find or load main class com.sun.tools.javac.Main

agicquel commented 6 years ago

Execute export HADOOP_CLASSPATH=/usr/lib/jvm/java-7-openjdk-amd64/lib/tools.jar add this command in your .bashrc if want to keep this env var

valmikkalathia commented 5 years ago

Thank you @agicquel . I was able to fix the problem by setting up the HADOOP_CLASSPATH environment variable.