0

I'm very new to ubuntu, I have installed java and while compiling nutch am getting this error.

BUILD FAILED
/home/surukam/Desktop/Nutch/nutch/build.xml:101: Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.

Perhaps JAVA_HOME does not point to the JDK. It is currently set to /usr/lib/jvm/java-8-openjdk-amd64/jre I tried to check java location with which java It shows /usr/bin/java. I tried to set java with export JAVA_HOME=/usr/bin/java and tried to compile it shows JAVA_HOME not set in this path, It accepts when i gave this export JAVA_HOME=/usr. Now my question is I need to set my JAVA_HOME in this path JAVA_HOME="$(/usr/libexec/java_home -v 1.8)" and NUTCH_JAVA_HOME="$(/usr/libexec/java_home -v 1.8)". can anyone help me with this ? Thanks in Advance.

0

The error message Unable to find a javac compiler; suggesting that it is unable to find javac compiler, which is the javac binary. Try searching for javac on your system running javac -version and you can be sure if javac compiler is installed or not.

The package that provides java is openjdk-8-jre, by default it doesn't come with the javac compiler, only Java runtime environment. To install javac, run sudo apt-get install openjdk-8-jdk which will install javac, you can be sure if it is installed running which javac or javac -version after installation is done.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.