3

I am trying to run neo4j for the first time.

In my RHEL 6 machine, I have Java 1.6 installed. I do not want to change that because other programs are using that. When I tried to run neo4j, downloaded from here, I got the error: ERROR! Neo4j cannot be started using java version 1.6.0_24. Please use Oracle(R) Java(TM) 7. Clearly, I need to install JAVA 7. I was wondering if I can just download Java 7 and let neo4j know the path to java executables.

3 Answers 3

3

Set the JAVA_HOME and PATH before starting the neo4j server.

set the path on the terminal.

export JAVA_HOME=/home/jdk/jdk1.7.0_45
export PATH=$JAVA_HOME/bin:$PATH

then start the neo4j or you can create a bash script to do this automatically.

2

The different major versions are normally different packages (e.g., java-1.7.0-openjdk-devel) that go in different directories (usually in /opt), and you can set the JAVA_HOME and/or JDK_HOME environment variables in your startup script. That said, there's rarely any harm in running your programs on the version 7 JVM (just like you can upgrade the kernel without touching your installed programs), and Java 6 is EOL and won't get new security updates.

1

neo4j 2.0.2 uses java7 it seems and hence requires jdk7.

Go to neo4j website and download 1.8.3 version

http://dist.neo4j.org/neo4j-community-1.8.3-unix.tar.gz

and if you have java 1.6.45 in ubuntu, you are done

untar and copy to /opt and issue the below command from neo4j root directory

sudo ./bin/neo4j start

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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