/*   Starting a java program: *.cmd with REXX   */
/*                                              */
/*   Copyright helge nordmann                   */
/*   norrsken data teknik --- 1999              */

'@echo off'
esc = d2c(27)
say esc'[0;30;46m'esc'[K'esc'[2J'
/* black on green */

/*   the usual stuff   */

call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
call SysLoadFuncs

/*   getting own path   */

parse source . . this_cmd
this_drive  = filespec( 'drive', this_cmd )
this_path   = filespec( 'path', this_cmd )
this_dir    = this_drive || this_path

/*   remove the trailing backslash from this_dir   */
this_di     = LEFT(this_dir, LENGTH(this_dir)-1)
command = "cd "||this_di
command

command = "java -jar JPhotoBrush.jar > error.txt"
command

exit
