Invoking Windows apps from file type

I

Ike

Oh this is a Windows-specific question I need to solve in Java. Assuming one
has MS Word on their system, how can I invoke word to come up with a given
document, when all I know is the document name, and that fact that if the
person were to double click the document name in Windows, it would invoke
Word with that document?

Thanks, Ike
 
S

Sandip Chitale

Does something like:

try {
Process p = Runtime.getRuntime().exec("cmd /c start c:\\resume.doc");
p.waitFor();
} catch (Throwable e) {
}

work for you?

HTH
sandip
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top