LP1741299 hatch.sh uses local jdk-11 bundles
authorBill Erickson <berickxx@gmail.com>
Wed, 27 Feb 2019 16:03:18 +0000 (11:03 -0500)
committerBill Erickson <berickxx@gmail.com>
Wed, 27 Feb 2019 16:03:18 +0000 (11:03 -0500)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
hatch.sh

index e90e8bd..640a919 100755 (executable)
--- a/hatch.sh
+++ b/hatch.sh
@@ -3,9 +3,13 @@
 # Linux/Mac Hatch Execution Script
 
 # Use this for openjdk
-JAVA_HOME=/usr
+#JAVA_HOME=/usr
 # Use this for local extract of Java libs
 #JAVA_HOME=jdk1.8
+# Use for JDK 1.11 local bundles
+JAVA_HOME="./jdk-11"
+JAVAFX_HOME="./javafx-sdk-11"
+JAFAFX_MODS="--module-path $JAVAFX_HOME/lib --add-modules=javafx.base,javafx.graphics,javafx.web"
 
 JAVA=$JAVA_HOME/bin/java
 JAVAC=$JAVA_HOME/bin/javac
@@ -26,7 +30,7 @@ if [ "$COMMAND" == "compile" ]; then
     fi;
 
     $JAVAC -Xdiags:verbose -Xlint:unchecked \
-        -cp lib/\* -d lib src/org/evergreen_ils/hatch/*.java
+        -cp lib/\* -d lib $JAFAFX_MODS src/org/evergreen_ils/hatch/*.java
 
     # Create a JAR file from the compiled class files them remove them.
     $JAR cf lib/hatch.jar -C lib org
@@ -38,12 +42,12 @@ elif [ "$COMMAND" == "test" ]; then
     # 2. Run Hatch and process messages emitted from #1.
     # 3. Run TestHatch in receive mode to log the responses.
 
-    $JAVA "$LOGS" -cp lib/\* org.evergreen_ils.hatch.TestHatch \
-        | $JAVA "$LOGS" -cp lib/\* org.evergreen_ils.hatch.Hatch \
-        | $JAVA "$LOGS" -cp lib/\* org.evergreen_ils.hatch.TestHatch receive
+    $JAVA "$LOGS" -cp lib/\* $JAFAFX_MODS org.evergreen_ils.hatch.TestHatch \
+        | $JAVA "$LOGS" -cp lib/\* $JAFAFX_MODS org.evergreen_ils.hatch.Hatch \
+        | $JAVA "$LOGS" -cp lib/\* $JAFAFX_MODS org.evergreen_ils.hatch.TestHatch receive
 
 else
 
     # run Hatch
-    $JAVA "$LOGS" -cp lib/\* org.evergreen_ils.hatch.Hatch
+    $JAVA "$LOGS" -cp lib/\* $JAFAFX_MODS org.evergreen_ils.hatch.Hatch
 fi;