Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Open XML file with user default browser and not the default editor.

807588Jul 2 2009 — edited Jul 2 2009
Hi,

I'm writing a java program that appends numerous XML files together. The result is a NEW well formed XML document. Since i have an XSLT that performs several UI modifications on this xml file, the file extension must remain '.xml'. I need to open this xml file with the users default web browser. The problem is that:

Runtime.getRuntime().exec(cmd);

....opens the xml file with the users default program for opening xml files which in my case is Oxygen. I want to force java to open this xml file with the users default web browser and nothing else.

I guess i need the Windows command to perform the 'open with' feature but i have no idea what that command is or how to find it.

Any ideas?

Thanks,

Varun Singh

Edited by: Jagara00 on Jul 2, 2009 3:49 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 30 2009
Added on Jul 2 2009
8 comments
814 views