Look at the Desktop and Runtime classes. You can call OS commands with methods in those classes.