Calling shell commands in java class

Discussions

Web tier: servlets, JSP, Web frameworks: Calling shell commands in java class

  1. Calling shell commands in java class (2 messages)

    Hi,

     I have a shell script that has cvs commands for committing files. I call this script from a java class using a runtimeProcess class.
    The problem is this script is run many times by a user - may be for cvs updates on the same files, in which case cvs locks the files and the successive updates fail.

    I was wondering if there is any way to call cvs directly instead of calling it in a separate process. Then depending on the number of cvs processes running i can either allow a new cvs update/commit.

    Thanks
    -raj
  2. Integrate "Ant" into your app and check out the various tasks provided.
  3. Use jCVS or a similar java client[ Go to top ]

    Raj -
    You should probably look at jCVS or ant. Either way you'll have a platform independent and supported means of interaction with CVS.

    http://www.jcvs.org/
    http://ant.apache.org/

    Thanks -
    Jon