Click to See Complete Forum and Search --> : starting other applications from a java app?!


Denis Moeller
August 19th, 1999, 05:37 AM
Hi,

I've got a java-application and want to start another application from it. Like Shell, Command or something. e.g. how can
I run a batchfile from within my Java application? Anyone?

Thanks a lot!

unicman
August 22nd, 1999, 11:08 AM
I'm sorry if I have got the question wrong. But if u want to know...
'how to execute a program from within java'

u can do it using Runtime class. Call its exec method. And if u want to wait till the program exists, that method returns Process object which has method something like 'wait'.

- UnicMan