Neo4j Java 7终端问题 [英] Neo4j Java 7 Terminal Issue

查看:100
本文介绍了Neo4j Java 7终端问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在启动neo4j实例(2.0.0 M03)时遇到问题.我已经按照下面的代码块所示安装了Java 7,但是当尝试启动neo4j时,它显然无法识别该错误,给出错误并且无法启动.终端输出如下.关于如何解决此问题或到底出了什么问题的任何想法?非常感谢.

I'm having issues starting my neo4j instance (2.0.0 M03). I have java 7 installed as indicated in the code block below but when trying to start neo4j it apparently does not recognize this, gives and error and does not start. The terminal output is below. Any ideas on how to fix this or what exactly is going wrong? Thanks a lot.

Tim-Bornys-MacBook-Pro:neo4j community 2.0.0 M03 BornyTM$ java -version
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)

Tim-Bornys-MacBook-Pro:neo4j community 2.0.0 M03 BornyTM$ bin/neo4j start
WARNING! You are using an unsupported version of the Java runtime. Please use Oracle(R)   Java(TM) Runtime Environment 7.
Starting Neo4j Server...WARNING: not changing user
process [88317]... waiting for server to be ready.... Failed to start within 120 seconds.
Neo4j Server may have failed to start, please check the logs.

推荐答案

问题是未将JAVA_HOME设置为正确的JVM.要确定实例的安装位置,可以在终端中输入以下内容:

The problem was JAVA_HOME was not set to the correct JVM. To determine where you have your instance installed you can enter the following into terminal:

/usr/libexec/java_home -v 1.7

在我的情况下,这应该返回位置:/Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home/

This should return the location, in my case: /Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home/

要设置JAVA_HOME,只需导出指向如下所示的位置(进入控制台)即可:

To set JAVA_HOME just export pointing towards the location like below (enter into the console):

export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home/

这篇关于Neo4j Java 7终端问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆