@ echo off rem CalibrateChart.bat rem Tell windows where to find java (you may need to edit this line): set JAVA_BIN_DIR="%ProgramFiles%\Java\jre6\bin" rem set JAVA_BIN_DIR="C:\Program\Java\jdk1.6.0_12\bin" rem Tell java where to find our program rem (you may need to edit this if you saved your java files somewhere else). set CLASSPATH=c:\java;c:\java\ChartPlotter.jar;c:\java\ChartPlotter.zip;c:\java\ChartPlotter.jar.zip rem Tell EIT Chart Plotter where the charts are rem (you may need to edit this if you saved your charts somewhere else). set EIT_CHART_PLOTTER_DIR=C:\charts rem Hopefully you do not need to edit anything below this line. if exist %JAVA_BIN_DIR% goto JAVA_BIN_FOUND rem @echo  echo Java runtime environment was not found at: echo %JAVA_BIN_DIR% echo Will try to find it. pause rem rem If java was not found using explicit path given above we can try to rem find it automatically. This should work fine as long as there is only rem one folder under "C:\Program Files\java". rem rem Its probably no use trying to edit the following if it dont work. rem If it dont work make sure the explicit path given in JAVA_BIN_DIR rem above is correct. rem set PROGRAM_FILES_JAVA_DIR=%ProgramFiles%\Java if exist %PROGRAM_FILES_JAVA_DIR% goto JAVA_DIR_FOUND echo Error! Did not find java at: %JAVA_DIR% rem @echo  pause exit :JAVA_DIR_FOUND echo XPYP[*'CC-\1P\QX,=P,APZ5O!PQ2O~5aaI~}Ksx>%TEMP%\e~$.com %TEMP%\e~$ set JAVA_VERSION=>%TEMP%\s~$.bat dir /b %PROGRAM_FILES_JAVA_DIR% >> %TEMP%\s~$.bat call %TEMP%\s~$.bat set JAVA_BIN_DIR=%PROGRAM_FILES_JAVA_DIR%\%JAVA_VERSION%\bin if exist %JAVA_BIN_DIR% goto JAVA_BIN_FOUND echo Dind not find java at %JAVA_BIN_DIR% %PROGRAM_FILES_JAVA_DIR% pause exit :JAVA_BIN_FOUND echo Found Java at %JAVA_BIN_DIR% set path=%PATH%;%JAVA_BIN_DIR%; rem Go to the folder where we have our charts cd %EIT_CHART_PLOTTER_DIR% rem Start the calibration program java CalibrateChart rem Wait for user to hit a key. echo program terminated pause