Executing a remote command on a unix server

How can I execute a unix command on a remote server. This server is different than the server that contains the java class.

I have 3 different unix servers involved. Basically I have to execute a checkout command on server A to get the current version of a file. Then I have to move the file to the production server C.

Thanks
manishksinha-2004Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
CEHJConnect With a Mentor Commented:
You can use a SSH implmentation but it sounds more like you're using CVS to me - why not use a Java CVS implementation?
0
 
objectsCommented:
if this is part of your build process then use ant.
If its your application then here's an example of calling an external command:
http://www.objects.com.au/java/examples/util/ConsoleExec.do
0
 
manishksinha-2004Author Commented:
How do we use SSH? One of the servers is PVCS versioning software.
 I guess I will still end up using the runtime call in java?
0
 
objectsConnect With a Mentor Commented:
> I guess I will still end up using the runtime call in java?

probably.

ant has a task for accessing PVCS, you may be able to take the code from that and use it in your application.
http://ant.apache.org/manual/OptionalTasks/pvcstask.html

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.