java left logo
java middle logo
java right logo
 

Home arrow Other API Tips
 
 
Main Menu
Home
Java Tutorials
Book Reviews
Java SE Tips
Java ME Tips
Java EE Tips
Other API Tips
Java Applications
Java Libraries
Java Games
Java Network
Java Forums
Java Blog




Most Visited Tips
Java SE Tips
Java ME Tips
Java EE Tips
Other API Tips
Java Applications
Java Libraries
Java Games
Book Reviews
Top Rated Tips
Java SE Tips
Java ME Tips
Java EE Tips
Other API Tips
Java Applications
Java Libraries
Java Games
Book Reviews


Statistics
Registered Users: 4089
Java SE Tips: 614
Java ME Tips: 202
Java EE Tips: 183
Other API Tips: 779
Java Applications: 298
Java Libraries: 209
Java Games: 16
Book Reviews:
 
 
 
How to use RExec task E-mail
User Rating: / 2
PoorBest 

RExec

Description

Task to automate a remote rexec session. Just like the Telnet task, it uses nested <read> to indicate strings to wait for, and <write> tags to specify text to send to the remote process.

Note: This task depends on external libraries not included in the Ant distribution. See Library Dependencies for more information.

Parameters

Attribute Values Required
userid the login id to use on the remote server. Yes
password the login password to use on the remote server. Yes
server the address of the remote rexec server. Yes
command the command to execute on the remote server. Yes
port the port number of the remote rexec server. Defaults to port 512 in BSD Unix systems. No
timeout set a default timeout to wait for a response. Specified in seconds. Default is no timeout. No

Nested Elements

The input to send to the server, and responses to wait for, are described as nested elements.

read

declare (as a text child of this element) a string to wait for. The element supports the timeout attribute, which overrides any timeout specified for the task as a whole. It also has a string attribute, which is an alternative to specifying the string as a text element.

It is not necessary to declare a closing <read> element like for the Telnet task. The connection is not broken until the command has completed and the input stream (output of the command) is terminated.

write

describes the text to send to the server. The echo boolean attribute controls whether the string is echoed to the local log; this is "true" by default

Example

A simple example of connecting to a server and running a command.
<rexec userid="bob" password="badpass" server="localhost" 
command="ls"/>

The task can be used with other ports as well:
<rexec port="80" userid="bob" password="badpass" server="localhost" 
command="ls"/>

Source: Apache Ant


 Related Tips

 
< Prev   Next >

Page 1 of 0 ( 0 comments )

You can share your information about this topic using the form below!

Please do not post your questions with this form! Thanks.


Name (required)


E-Mail (required)

Your email will not be displayed on the site - only to our administrator
Homepage(optional)



Comment Enable HTML code : Yes No



 
       
         
     
 
 
 
   
 
 
java bottom left
java bottom middle
java bottom right
RSS 0.91 FeedRSS 1.0 FeedRSS 2.0 FeedATOM FeedOPML Feed

Home - About Us - Privacy Policy
Copyright 2005 - 2008 www.java-tips.org
Java is a trademark of Sun Microsystems, Inc.