I am writing a program in java which would execute winrar and unzip a jar file for me placed in h:\\myjar.jar into the folder h:\\new. My java code
h:\\myjar.jar
h:\\new
The dir you specified is a working directory of running process - it doesn't help to find executable. Use cmd /c winrar ... to run process looking for executable in PATH or try to use absolute path to winrar.
dir
cmd /c winrar ...