[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Executing a remote command on a unix server

Posted on 2004-04-16
6
Medium Priority
?
277 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
6 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 252 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 248 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses

649 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