Priestley, Andy writes:
 > Hello Everyone!
 > 
 > I'm new to this mailing list and am looking quite forward to conversing w/ you all. 
 > 
 > I'm attempting to put UNIX commands w/i in my Java code. A simple
 > example of this would be to change directories on the UNIX box and
 > look for files w/ a given extension. I'm having a difficult time
 > locating documentation on how to do this, and more complex forms of
 > the same idea. Do any of you have any experience in this area or
 > can point me to some documentation our online source code that does
 > similar tasks. I'd be ver grateful. Thanks for your help.

For the kind of thing you're talking about, you should use the
appropriate java classes.  Look at java.io.File.  Also, dig around on
search engines for "java reading directories".  I quickly found this;

http://www.artima.com/java/answers/Jul2000/messages/73.html

which may help.

Now, if your example was merely a bad example, and you still have a
need to run external programs on linux, then you should check out the
'exec' method on class java.lang.Runtime.  It is a bit tricky to use
properly, but there is an excellent tutorial here;

http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps_p.html

Good luck.


Sean

-- 
Sean R. Owens
[EMAIL PROTECTED]
412-268-3194 (office number)


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to