Hi manisha ,
I tried the same above but it's not opening the command prompt ,
it's compiled successfully , but it is hanging after that ,
sekharbabuk@sekharbabuk /cygdrive/c/j2sdk1.4.2_16/bin
$ javac RunUnixCommand.java
sekharbabuk@sekharbabuk /cygdrive/c/j2sdk1.4.2_16/bin
$ java RunUnixCommand
-----------###------------------------------------------
Command = cmd.exe
--------------------------------------------------------
File Found : Microsoft Windows XP [Version 5.1.2600]
File Found : (C) Copyright 1985-2001 Microsoft Corp.
File Found :
i tried this using cygwin environment in windows operating system..