@echo off

REM uncomment and update the following line to provide your java path
REM PATH=c:\myjavapath;%PATH%

REM Set BASE to this script's directory
set BASE=%~dp0

REM Check if java is in the PATH
where java >nul 2>nul
if not %errorlevel% == 0 (
	echo java is not in the path
	echo 1. Install java if not present
	echo 2. Update PATH variable to include java,exe directory
	echo 3. Update PATH variable at the beginning of this script
	exit /b
)

REM Start java version check
echo %BASE%
java -cp "%BASE%\." Test
if not %errorlevel% == 0 (
	echo java must be version 1.8 or higher
	exit /b
)
REM End java version check

REM Start the scanner
java -Xmx1024m -Duser.language=en -Djava.util.logging.config.file="%BASE%\hmcScanner.properties" -cp "%BASE%\bcprov-jdk15on-1.69.jar";"%BASE%\jsch-0.1.67.jar";"%BASE%\hmcScanner.jar";"%BASE%\jxl.jar" hmcScanner.Loader %*

