8 Replies Latest reply: Jul 2, 2009 6:43 PM by 807588 RSS

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

    807588
      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