==== Download org.json Java JSON Library ====
-[source,sh]
--------------------------------------------------------------------------
-$ mkdir -p lib
-$ cd lib
-$ wget -O json-20160810.jar \
- 'https://search.maven.org/remotecontent?filepath=org/json/json/20160810/json-20160810.jar'
-$ cd ../
--------------------------------------------------------------------------
+===== Linux =====
+
+The org.json jar file is retrieved automatically when running
+'hatch.sh compile' (below).
+
+===== Windows =====
+
+1. Create a directory called "lib" inside the Hatch directory.
+2. Download the JSON jar file and put it into the "lib" directory:
+
+https://search.maven.org/remotecontent?filepath=org/json/json/20160810/json-20160810.jar
==== Compile Hatch Java ====
JAVA=$JAVA_HOME/bin/java
JAVAC=$JAVA_HOME/bin/javac
LOGS=-Djava.util.logging.config.file=logging.properties
+JSON_BUILD="20160810"
+JSON_JAR="json-$JSON_BUILD.jar"
+JSON_URL="https://search.maven.org/remotecontent?filepath=org/json/json/$JSON_BUILD/$JSON_JAR"
COMMAND="$1"
if [ "$COMMAND" == "compile" ]; then
+ mkdir -p lib
+ if [ ! -f lib/$JSON_JAR ]; then
+ echo "Fetching JSON libs..."
+ wget -O lib/$JSON_JAR $JSON_URL
+ fi;
+
$JAVAC -Xdiags:verbose -Xlint:unchecked \
-cp lib:lib/\* -d lib src/org/evergreen_ils/hatch/*.java