Solved

Executing a remote command on a unix server

Posted on 2004-04-16
6
272 Views
Last Modified: 2012-05-04
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
0
Comment
Question by:manishksinha-2004
  • 2
6 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 63 total points
ID: 10845353
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
 
LVL 92

Expert Comment

by:objects
ID: 10846366
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
 

Author Comment

by:manishksinha-2004
ID: 10859599
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
 
LVL 92

Assisted Solution

by:objects
objects earned 62 total points
ID: 10864535
> 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

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
JDeveloper 12c for 32 bit 4 84
ArrayIndexOutOfBoundException 9 81
servlet example 11 40
sql import cannot be resolved jsp 3 20
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question