Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
djy0215 opened this issue Jan 21, 2018 · 2 comments
Open

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

djy0215 opened this issue Jan 21, 2018 · 2 comments

Comments

@djy0215
Copy link

djy0215 commented Jan 21, 2018

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
Copy link

agicquel commented Feb 5, 2018

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants