I followed this tutorial http://saskia-vola.com/nutch-2-2-elasticsearch-1-x-hbase/ When I finally tried to run Nutch
sudo bin/nutch inject urls
Error: JAVA_HOME is not set.
You are running the command as root user, so the environment variables the application sees are the one's visible for root user not your user. Just check that the root has a JAVA_HOME environment variable set or run the program as your user, if possible.
You can try
sudo -E bin/nutch inject urls
As the sudo manual says, -E, --preserve-env Indicates to the security policy that the user wishes to preserve their existing environment variables. The security policy may return an error if the user does not have permission to preserve the environment.