0

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

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.
4

1 回答 1

4

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

/usr/libexec/java_home -v 1.7

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

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

export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home/
于 2013-08-13T02:38:39.630 回答