Reputation: 3
I am running into problems with Neo4J server under UBUNTU 16.04. I wanted to install the version 2.3.3 of neo4j. Now when I tried to start the server, I got this error:
➜ ~ sudo /var/lib/neo4j/bin/neo4j start
ERROR: Unable to find java. (Cannot execute /usr/lib/jvm/java-7-oracle/jre/bin/java/bin/java) * Please use Oracle(R) Java(TM) 7 or OpenJDK(TM) to run Neo4j Server. * Please see http://docs.neo4j.org/ for Neo4j Server installation instructions.
The thing is that my JAVA_HOME is not the path given by the error:
➜ ~ echo $JAVA_HOME /usr/lib/jvm/java-8-oracle/
Any idea about the root cause of this issue?
Upvotes: 0
Views: 1896
Reputation: 24060
When you run it as 'sudo' you are running it as the root user, not your user. As a result your JAVA_HOME
path (which is your user environment) won't apply.
Upvotes: 0