From 3f0953c197f4bbeafed84f442ab045c7909a10f2 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Fri, 10 Feb 2017 14:37:28 -0500 Subject: [PATCH] LP#1646166 Use Java executables in path on Windows Assume Windows knows where the Java executables live. This is typical, and means we don't have to handle that in the installer. Environment variables remain in .bat file for ease of overriding the default. Signed-off-by: Bill Erickson --- hatch.bat | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/hatch.bat b/hatch.bat index 2e73782..9e38151 100755 --- a/hatch.bat +++ b/hatch.bat @@ -1,10 +1,18 @@ @echo off REM Windows Hatch Execution Script REM @echo off required for STDIO to work with the browser. -SET JAVA_HOME="C:\Program Files\Java\jdk1.8.0_111" -SET JAVA=%JAVA_HOME%\bin\java -SET JAVAC=%JAVA_HOME%\bin\javac -SET JAR=%JAVA_HOME%\bin\jar + +REM Assume java executables are in our path +SET JAVA=java +SET JAVAC=javac +SET JAR=jar + +REM Optionally override the java path +REM SET JAVA_HOME="C:\Program Files\Java\jdk1.8.0_111" +REM SET JAVA=%JAVA_HOME%\bin\java +REM SET JAVAC=%JAVA_HOME%\bin\javac +REM SET JAR=%JAVA_HOME%\bin\jar + IF "%1" == "compile" ( -- 2.11.0