Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

calling programs from Java

Status
Not open for further replies.

sjohri214

Programmer
Jul 19, 2002
24
0
0
GB
Hi,

My Question is, can i call a program ( MS-word for example) which i have installed on my system using Java ?

I would be grateful for any assistance

Thanks
 
Hi Again,

I figured out how to do it - using Runtime.exec(), so don't worry

Thanks Anyway
 
If you want to use Runtime.exec() you should check out this article
Runtime.exec() has an error and an output stream. If the program you run sends messages to these streams it may fill up you buffers.

Although, I don't expect MS-Word will generate much output, it normally just bombs if there is an error!

Also, remember that you could run java.exe in Runtime.exec() starting a java program in it's own JVM. Jeremy Nicholson, Director of a UK-based Java and Data Warehousing consultancy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top