By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,943 Members | 1,875 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,943 IT Pros & Developers. It's quick & easy.

Executing unix commands from java application

P: n/a
I seem to remember there's a java function for executing commands on the
native system (UNIX in this case) but cannot remember which. Anyone know?

Also, is it possible to grab the results of the command back into the java
app?

Example:

1. Execute the 'ls -l' command on the unix machine
2. Grab the reults back into a variable
Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
> 1. Execute the 'ls -l' command on the unix machine
Runtime#exec()
2. Grab the reults back into a variable

Process#getInputStream()
Jul 17 '05 #2

P: n/a
Aaaah! Thats it!

Thanks!

Simon
"hiwa" <HG******@nifty.ne.jp> skrev i meddelandet
news:68**************************@posting.google.c om...
1. Execute the 'ls -l' command on the unix machine

Runtime#exec()
2. Grab the reults back into a variable

Process#getInputStream()

Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.