0

On Windows, my %JAVA_HOME% points to JDK 17 and I would like to keep it that way.

I would like to configure Neo4j to use JDK 11 then install it as a Windows service.

Just setting %JAVA_HOME% to JDK 11 on the command line allows to start Neo4j with "neo4j console" but I would like to have it installed with "neo4j install-service".

Maxime Vernier
  • 340
  • 1
  • 9

1 Answers1

0

It seems like neo4j uses Apache Commons Daemon to run its Java class as a service.

After running Invoke-Neo4j install-service, we can see the service generated in the Windows Service Pannel, which runs a command like <NEO4J_HOME>\bin\tools\prunsrv-amd64.exe //RS//neo4j.

One can check the command line options of procrun at https://commons.apache.org/proper/commons-daemon//procrun.html. An option that might be useful is --JavaHome.

So, I think you can try modifying the Windows service generated by neo4j.

As for the ways to make some modification, here are some references:

henry_23
  • 56
  • 4