@echo off
setlocal

rem ---------------------------------------------------------------------
rem Confirm installation of JAVA compiler under %JAVA_JDK%
rem and of Isight under %FIPER_HOME%
rem
rem *** IMPORTANT *** 
rem The Java compiler must be of correct version. Please refer
rem "Application Development - Environment Setup" section of the 
rem Development Guide, to know the required Java compiler version.
rem ---------------------------------------------------------------------
if not exist "%JAVA_JDK%\bin\javac.exe" echo The environment variable JAVA_JDK must point to a Java JDK && exit /B 1

if exist "%FIPER_HOME%\docs\java\SMAFIPsdk.jar" goto CONTINUE

call "%~dp0%\..\..\..\code\command\fiperenv.bat"

if exist "%FIPER_HOME%\docs\java\SMAFIPsdk.jar" goto CONTINUE

echo The environment variable FIPER_HOME must point to an Isight installation
exit /B 1

:CONTINUE

rem ---------------------------------------------------------------------
rem Set up the classpath and compile everything in this directory
rem ---------------------------------------------------------------------
set CLASSPATH=%FIPER_HOME%\docs\java\SMAFIPsdk.jar;%FIPER_HOME%\docs\java\SMAFIPdesktopsdk.jar;%FIPER_HOME%


"%JAVA_JDK%\bin\javac.exe" -cp "%CLASSPATH%" %1.java
