Neo4j-admin import Java problem, Windows 10

I have an old Windows 10 machine that is getting flaky, so I got a new one, and I am having trouble running neo4j-admin on it. I can bring up the Neo4j browser just fine, but I am having issues using neo4j-admin to do an import. I have no problems on the old machine.

Neo4j-admin does not find a Java installation (shouldn't that be established as part of the installation process?) So I added a path variable to point to the java folder, which now seems to be a Zulu version, in C:\Users\ewald.Neo4jDesktop\distributions\java\zulu11.41.23-ca-jdk11.0.8\bin.
Now it finds java, but complains about files that are in the current directory, not a problem I've ever seen before:

C:\Users\ewald\.Neo4jDesktop\relate-data\dbmss\dbms-2080368d-b331-4a9e-9838-48e8efec35cb\import> ..\bin\neo4j-admin import --database BCB --nodes=BCB_nodes.csv --relationships=BCB_links.csv
Selecting JVM - Version:11.0.8, Name:OpenJDK 64-Bit Server VM, Vendor:Azul Systems, Inc.
Invalid value for option '--nodes' at index 0 ([<label>[:<label>]...=]<files>): Invalid nodes file: BCB_nodes.csv (java.lang.IllegalArgumentException: File 'BCB_nodes.csv' doesn't exist)

It doesn't seem to find the input file. This command still works fine on my old computer. I tried uninstalling Neo4j, and reinstalling it, but I get the same result. I tried downloading Oracle's version 11 and creating a path to that; that also didn't work.

I have the same problem. I tried to run the example from the Using neo4j-admin Tool for Import course.
I've tried to run this command in Windows 10:
..\bin\neo4j-admin import --database crimes --nodes crimes_header.csv,crimes.csv --nodes beats.csv --nodes=PrimaryType=primaryTypes.csv --relationships crimesBeats.csv --relationships=PRIMARY_TYPE=crimesPrimaryTypes.csv --trim-strings=true > import.out

I fixed the issue. The file name needs to be fully specified, all the way from C:. That wasn't the case previously. Don't try to use something like .\nodes.csv for the file name. That won't work.
I hope it works for you.

1 Like

Yes, it worked. Thank you.