cancel
Showing results for 
Search instead for 
Did you mean: 

Windows JAVA 8 v 11 - neo4j either can't find 1.8 or doesn't like it

bscola
Node

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

TIA

4 REPLIES 4

koji
Ninja
Ninja

Hi @bscola

I think Neo4j 1.4.3 means Neo4j Desktop, not Community/Enterprise.
The Neo4j Desktop already includes Java 8/11.

C:\Program Files\Neo4j Desktop\resources\offline\java
zulu8.48.0.53-ca-jdk8.0.265-win_x64
zulu11.41.23-ca-jdk11.0.8-win_x64

Neo4j 3.5.x uses Java 8 and Neo4j 4.x uses Java 11.
You can set the path so that the installed Java is not read first.

bscola
Node

Let's try again...

PATH=C:\Program Files\Java\jdk-11.0.10\bin\server;C:\Windows\system32; ....

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 for Neo4j installation instructions.
    Invoke-Neo4j : This instance of Java is not supported
    At C:\Neo4j\bin\neo4j.ps1:29 char:7
  • Exit (Invoke-Neo4j -Verbose:$Arguments.Verbose -Command $Arguments.Ar ...
  •   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
    • FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Invoke-Neo4j

what do I need to do with my path or my Java installation to get the Console/Service to run ??

Thanks

bscola
Node

OK ---- After uninstalling Java 1.8 the Console is now starting ----
But the Service won't start. Does it really have to be this hard ??

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.

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

On November 16 and 17 for 24 hours across all timezones, you’ll learn about best practices for beginners and experts alike.