Link to home
Start Free TrialLog in
Avatar of mitra_subhasis
mitra_subhasis

asked on

Excecuting system commands...

How I can execute a system command within a java program. For example, as in C under Unix, we can execute system command by

system("command");
ie. for clearing the screen we use
system("clear");
etc...

How I can do the same in java?

Subhasis.
Avatar of shyamkumarreddy
shyamkumarreddy
Flag of United States of America image

Hey Mitra
Use Runtime.exec() format to executate your shell commands.
Not all commands are supported
Shyam
ASKER CERTIFIED SOLUTION
Avatar of Ovi
Ovi

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mitra_subhasis
mitra_subhasis

ASKER

yes, satisfactory.

Subhasis