How to set JAVA_HOME and NUTCH_JAVA_HOME in ubuntu., I tried but while compile nutch with ANT but getting this error
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/jreI 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.
1 Answer
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.
More in general
"Zoraya ter Beek, age 29, just died by assisted suicide in the Netherlands. She was physically healthy, but psychologically depressed. It's an abomination that an entire society would actively facilitate, even encourage, someone ending their own life because they had no hope. Th…"