2017-06-09 15:28:18 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
2017-07-13 02:17:26 +08:00
|
|
|
set -e
|
|
|
|
|
2017-06-09 15:28:18 +08:00
|
|
|
JAVA=java
|
|
|
|
JAVAC=javac
|
|
|
|
|
|
|
|
if ! which $JAVA >/dev/null; then
|
|
|
|
echo "Please install java!"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if ! which $JAVAC >/dev/null; then
|
|
|
|
echo "Please install javac!"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
DRIVER=neo4j-java-driver.jar
|
|
|
|
|
|
|
|
if [ ! -f $DRIVER ]; then
|
|
|
|
wget -O $DRIVER http://central.maven.org/maven2/org/neo4j/driver/neo4j-java-driver/1.3.1/neo4j-java-driver-1.3.1.jar || exit 1
|
|
|
|
fi
|
|
|
|
|
2017-07-13 02:17:26 +08:00
|
|
|
javac -classpath .:$DRIVER Basic.java
|
|
|
|
java -classpath .:$DRIVER Basic
|
|
|
|
|
|
|
|
javac -classpath .:$DRIVER MaxQueryLength.java
|
|
|
|
java -classpath .:$DRIVER MaxQueryLength
|