2013-08-31 64 views
0

我使用可能Neo4j的錯誤

Ubuntu 12.04 
Neo4j - Graph Database Kernel 2.0.0-M04 
javac 1.7.0_25 
java version "1.7.0_25 
Java(TM) SE Runtime Environment (build 1.7.0_25-b15) 

即使這樣,我使用的是Oracle的Java,我得到警告:

"WARNING! You are using an unsupported Java runtime. Please use Oracle(R) Java(TM) Runtime Environment 7." 

當我在Neo4j的目錄調試utils file,我發現了一個函數以下評論:

# check if running JDK 6, warn if not 
checkjvmcompatibility() { 

    $JAVACMD -version 2>&1 | egrep -q "Java HotSpot\\(TM\\) (64-Bit Server|Client) VM" 

    if [ $? -eq 1 ] 
    then 
    echo "WARNING! You are using an unsupported Java runtime. Please use Oracle(R) Java(TM) Runtime Environment 7." 
    else 
    $JAVACMD -version 2>&1 | egrep -q "java version \"1.7" 
    if [ $? -eq 1 ] 
    then 
     echo "WARNING! You are using an unsupported version of the Java runtime. Please use Oracle(R) Java(TM) Runtime Environment 7." 
    fi 
    fi 
} 

有些困惑:

comment of function shows that it is checking for java 6 but error message displayed use 'echo' shows that you are not using java run time 7. 

所以,實際上neo4j預計到了什麼樣的Java?

我正在使用Oracle-Java-1.7,但它仍然在拋出我沒有使用Oracle-Java1.7的錯誤。

感謝 阿米特AGGARWAL

回答

2

Neo4j的2.0應該是與Java 7上運行。我猜想腳本中的評論是誤導性的。請將JAVA_HOME指向正確的目錄。在Linux上,這是沒有必要的有效的,如果java -version顯示版本7

JAVA_HOME=/usr/lib/jvm/java-7-oracle 

要檢查Neo4j的實際使用來看

grep "JVM information" -A 5 <neo4j_dir>/data/graph.db/messages.log 
1

這是一個錯誤,我得到了

ERROR! Neo4j cannot be started using java version 1.7.0_25. 
... 
http://localhost:7474/ is ready. 

哪個版本所以它似乎啓動了,即使它給出了這個錯誤信息。