Windows 10 64 bit - neo4J 1.4.3
I have both Java 1.8.0_281 and jdk-16_windows-x64 installed
Path=C:\Program Files\Java\jdk-11.0.10\bin\server;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32; ....
Trying to start either the Console or the Service-
VERBOSE: Java detected at 'C:\Program Files (x86)\Java\jre1.8.0_281\bin\java.exe'
VERBOSE: Invoking "C:\Program Files (x86)\Java\jre1.8.0_281\bin\java.exe" -version 2>&1
VERBOSE: Command returned with exit code 0
VERBOSE: Java version response: java version "1.8.0_281"
Java(TM) SE Runtime Environment (build 1.8.0_281-b09)
VERBOSE: Java Version detected as 1.8.0_281
WARNING: ERROR! Neo4j cannot be started using java version 1.8.0_281
Now if I remove 1.8 leaving JDK 11, neo4j fails saying it can't find 1.8.
If I have 1.8 installed it says it can't use it.
I'm in some kind of configuration funk and could use some help
Note Java JDK11 is in the start of the path. Java 8 is not in the path
Trying to start-
neo4j console -verbose
VERBOSE: Neo4j Root is 'C:\Neo4j'
VERBOSE: Neo4j Server Type is 'Community'
VERBOSE: Neo4j Version is '4.2.4'
VERBOSE: Neo4j Database Mode is ''
VERBOSE: Console command specified
VERBOSE: Java detected at 'C:\Program Files (x86)\Java\jre1.8.0_281\bin\java.exe'
VERBOSE: Invoking "C:\Program Files (x86)\Java\jre1.8.0_281\bin\java.exe" -version 2>&1
VERBOSE: Command returned with exit code 0
VERBOSE: Java version response: java version "1.8.0_281"
Java(TM) SE Runtime Environment (build 1.8.0_281-b09)
Java HotSpot(TM) Client VM (build 25.281-b09, mixed mode)
VERBOSE: Java Version detected as 1.8.0_281
WARNING: ERROR! Neo4j cannot be started using java version 1.8.0_281
WARNING: * Please use Oracle(R) Java(TM) 11, OpenJDK(TM) 11 to run Neo4j Server.
Please see Neo4j documentation - Neo4j Documentation for Neo4j installation instructions.
Invoke-Neo4j : This instance of Java is not supported
At C:\Neo4j\bin\neo4j.ps1:29 char:7
I'm just getting started with Neo4j and ran into the same issue. Since I had some random JREs installed by Ninite when I set up the system, I downloaded the JDK11 from the java homepage to be sure.
Into system variables I added the user variable "JAVA_HOME" with the value "C:\Program Files\Java\jdk-11.0.12" (or wherever the directory is saved for you). I did not modify the path variable by the way. This solved the problem for me.