0

In my current environment ,

1) I have hadoop running with java version "1.7.0_91"

2) I have a new requirement where I have to install neo4j 3.0 which require java 8 which I have installed but not used as default. The default version used is "1.7.0_91" only.

Now my question is how can I point my neo4j to run 1.8 while without disturbing the old version. Both the java version are installed under /usr/java

I tried this command to run

neo4j install 
PATH=/usr/java/jdk1.8.0_60/bin:$PATH ./bin/neo4j start

but no luck, can someone please help me resolve this issue

Mandeep Singh
  • 1,287
  • 14
  • 34
hadoopsbx
  • 71
  • 1
  • 4

2 Answers2

0

Java 7 and 8 are compatible with each other, why would you run two versions? Just run everything under Java 8.

breakline
  • 5,776
  • 8
  • 45
  • 84
  • This should be a comment, not an answer. – RealSkeptic Oct 20 '16 at 07:27
  • As I have different version, before starting the neo4j, I am using an export command as export JAVA_HOME=/usr/java/jdk1.8.0_60 and then I am starting neo4j, the other way around is we can add the export command in the script which I am calling in start neo4j. This solved. – hadoopsbx Feb 08 '17 at 18:56
0

Java is Backwards Compatible. It means that you can run Java 7 programs on Java 8 platform.

See this oracle documentation.

Backward Compatibility

Java versions are expected to be binary backwards-compatible. For example, JDK 8 can run code compiled by JDK 7 or JDK 6. It is common to see applications leverage this backwards compatibility by using components built by different Java version. A Compatibility Guide (explained later) exists for each major release to provide special mention when something is not backwards compatible.

Refer to this stackoverflow answer for more insights.

Community
  • 1
  • 1
Raman Sahasi
  • 30,180
  • 9
  • 58
  • 71