Hi All,
I am able to retrieve and store file in the unix box using java.(by importing com.jcraft.jsch package).
Now I need to pass unix commands (cat, grep) in java. How can i do that?
I read the forum and used the below code to search for success string in filename.log.
And I get the following error
Cannot run program "cat": CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
Can any one help me out?
I am able to retrieve and store file in the unix box using java.(by importing com.jcraft.jsch package).
Now I need to pass unix commands (cat, grep) in java. How can i do that?
I read the forum and used the below code to search for success string in filename.log.
And I get the following error
Cannot run program "cat": CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
Can any one help me out?