So, I’ve been working out how to get Neo4j installed on my Windows 8 machine.
The j in neo4j does indeed stand for Java, and so I installed the JDK and JRE for my system (x64), and then I extracted neo4j to a suitable directory, (e:\Databases\Neo4j) and went to run the server to get some hot graphdb action… so I run:
AS is detailed in the online instructions… BAM! No dice… turns out I was missing a NEO4J_HOME environment variable… OK, we add that bad boy in, pointing to the unzip location..
YEH! We’re in…
Now, that all works, but I’d rather have it as a service, I don’t want the Java window up all the time… so
[SC] CreateService Success
[SC] StartService FAILED 2:
The system cannot find the file specified.
eh? It runs fine otherwise…
What is it trying to run?
Editing the neo4j.bat file, we discover it calls the base.bat file, so.. let’s edit the base.bat file…
A quick CTRL+F search for ‘install’ a couple of ‘Find Nexts’ later, and we hit paydirt…
rem function install
The next line begins ‘set binpath=….’ now, I’m pretty lazy when it comes to my ‘bothered to hunt out a problem’ and if there is a cheat way to go, I will! So – I could read the line, understand where all the bits are, or…. copy it, paste it above and put echo in front of it…
When I next run my install, I get this line:
set binPath="C:\Program Files\bin\java.exe….
that doesn’t look right… a quick look in c:\program files proves that yes – I don’t have a ‘bin’ folder in there… so.. in the bat file I note it’s looking for %javaPath%, trusty CTRL+F to the rescue and we end up at a section entitled:
which uses the Environment variable ‘JAVA_HOME’. In the command prompt, a quick:
tells me that this is NOT set anywhere.
So, I add the JAVA_HOME environment variable pointing to: C:\Program Files\Java\jre7
To tidy up you understand, and then
And we’re cooking!
Friday, July 27, 2012 5:00 PM