Solved

Executing a remote command on a unix server

Posted on 2004-04-16
6
270 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
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 …
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

762 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now