Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to use cvs checkout command in java

807580Mar 19 2009 — edited Feb 11 2010
Hi,

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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 11 2010
Added on Mar 19 2009
22 comments
538 views