how to use cvs checkout command in java
807580Mar 19 2009 — edited Feb 11 2010Hi,
I am using Ubuntu
I have installed cvs client in ubuntu
I have one problem running 'cvs checkout' command through java..
"cvs" -d ":ext:user@xxx.xxx.xxx.xxx:/var/cvs" co -P "Auto/test"
When i run the above command in terminal, i got one prompt like 'user@xxx.xxx.xxx.xxx's password:' in the terminal if i give the valid password the folder 'Auto' checked out successfully..
I have tried following steps but i don't know how to give the password to the terminal using java
First i created the 'checkout.sh' file.
In this i have typed "cvs" -d ":ext:user@xxx.xxx.xxx.xxx:/var/cvs" co -P "Auto/test"
Then i call it using java by the following code
=================================================================
String cmd[] = {"bash","checkout.sh"};
Runtime.getRuntime().exec(cmd).waitFor();
=================================================================
Anyone let me know how do I achieve this in java?
Thanks in Advance
Kulandaivelu