On Mon, 4 Oct 1999, Nick Rothwell wrote:

> > Does anyone know how I can execute an OS command like "dir" from a
> > servlet?
> >
>         Runtime.getRuntime().exec()?
> >
> > And if it's possible, does it compromise the portability? I guess so.
> >
>         I'll say. I don't even have "dir" on our server. I'm sure
> there are much better ways of getting directory listings from Java
> itself - I've not investigated.

For something like "dir" in particular, try java.io.File's list()
method.

Milt Epstein
Research Programmer
Software/Systems Development Group
Computing and Communications Services Office (CCSO)
University of Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to