Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

JAVA_HOME is not defined correctly. We cannot execute

I have removed all old Java 8 files/folders and reinstalled Java 11 in my machine. However when trying to run neo4j, it shows JAVA_HOME is not defined correctly. Here are my folders/files of jvm

I have tried following some questions to edit the etc/profile file, but still no success in getting it to work.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Newer Java versions don’t define JAVA_HOME anymore. You removed Java 8 but the environment variable wasn’t removed. Neo4j tries to find something in the folder defined in JAVA_HOME which points to your old Java installation. Since you removed that folder, you get an error saying it can’t find the folder.

You’d need to change JAVA_HOME so it points to your new Java installation since Java doesn’t do that automatically.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading