@ echo off rem ChartPlotter.bat rem Tell windows where to find java (you may need to edit this line): set JAVA_BIN_DIR="%ProgramFiles%\Java\jre6\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 Tell windows where to find the Comm Ports TcpIp Server rem (you may need to edit this if you saved comport_ip_server.exe somewhere else). set BIN_DIR=c:\bin rem you should not need to edit anything below this line... echo ------------------------------------------------- echo The following procedure is recomended: echo 1) Start computer echo 2) Start other programs using other serial ports echo 3) Connect the GPS echo 4) Start this bat script echo ------------------------------------------------- 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 Using Java RTE at %JAVA_BIN_DIR% set path=%PATH%;%JAVA_BIN_DIR%; rem Start the server, read more about start at: http://www.computerhope.com/batch.htm rem If you wish to allow connection from other computers remove "-l" below. start %BIN_DIR%\comport_ip_server.exe -l rem Go to the folder where we have our charts cd %EIT_CHART_PLOTTER_DIR% rem Start the chart plotter. rem If you know on which port your GPS is connected use the following: rem set baudrate on serial port to same as GPS (here assuming it is on COM1) rem MODE.COM COM1 4800,N,8,1 rem java ChartPlotter -pCOM1 rem If you dont know on which port your GPS is on use this to start: java ChartPlotter -n9999 -a rem It is possible to use serial ports on another computer if it is running rem the comport_ip_server rem (www.eit.se/hcpips). rem java ChartPlotter -h192.168.42.221 -pCOM23 -pCOM24 -pCOM1 rem ChartPlotter can connect to a server for sharing positions. If this is desired start using this line instead: rem java ChartPlotter -a -morion19.eit.se rem Wait for user to hit a key (in case there is an error message). echo program terminated pause