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

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

sabre150 wrote:
Jagara00 wrote:
Your right, but my question relates to the java issue and not the XSLT aspect of the problem. I am looking for a java solution for reasons i will no go into here. You have lost me.Me too.
People do not often ask questions (or make challenges or observations) idly for the sake of 'theory'. It is most useful to explain to the best of your ability.
As to
"Since the Desktop class was only released with SE 6 I am forced to find another alternative. "
There is an 'alternative'. You can import it into a 1.5 project. It was available as a free standing API before 1.6 - through JDIC. See [https://jdic.dev.java.net/documentation/Examples.html|https://jdic.dev.java.net/documentation/Examples.html] for more info.
Edit 1:
To a later reply
"Do u .."
..want to spell incorrectly when you get frustrated?
"..do not wish to.."
..get any help? That is the way you are heading.
Edited by: AndrewThompson64 on Jul 3, 2009 9:27 AM

Similar Messages

  • I can't open NEF files with PS Elements9 (Mac) and have just performed all avail. updates

    I can't open NEF files with PS Elements9 (Mac) and have just performed all avail. updates.  What to do?

    Many thanks!!!  This works and is probably the best fix for now.  Thank you!!!
    Date: Wed, 30 Jan 2013 10:58:01 -0800
    From: [email protected]
    To: [email protected]
    Subject: I can't open NEF files with PS Elements9 (Mac) and have just performed all avail. updates
        Re: I can't open NEF files with PS Elements9 (Mac) and have just performed all avail. updates
        created by 99jon in Photoshop Elements - View the full discussion
    For the D600 NEF's you have two alternatives: (1) Upgrade to PSE 11. (2) Download and install the free Adobe DNG converter to convert your raw files to the Adobe universal Raw format and the files will open in all versions of PSE (keep your originals as backups and for use in the camera manufactures software)  Windows download click here DNG Converter 7.3  Mac download click here DNG Converter 7.3  You can convert a whole folder of raw images in one click. See this quick video tutorial: You Tube click here for DNG Converter tutorial
         Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/5034913#5034913
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/5034913#5034913
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/5034913#5034913. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Photoshop Elements by email or at Adobe Community
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • I have completed an online form and am trying to send it to the organization. When I say submit, it tries to connect to File:///C/users/Gail/Downloads and not to the organisations site

    I have completed an online form and am trying to send it to the organization. When I say submit, it tries to connect to File:///C/users/Gail/Downloads and not to the organisations site

    There's nothing you can do about it. Report the problem to the organization. They need to fix it and send you a new version of the PDF.

  • How can I have links within emails read with Seamonkey open on the default Firefox browser and not the Seamonkey browser?

    I use the SeaMonkey 2.0 mailer for my email client and Firefox 3.6 for my default browser. A link embedded in an email (read with SeaMonkey) opens the SeaMonkey browser and not Firefox. How can I have it open on Firefox?
    (SeaMonkey is not set up as the default browser and Firefox is.)

    See here
    *https://support.mozilla.org/en-US/kb/how-make-web-links-open-firefox-default

  • After closing firefox, the next time I open it my homepage has gone back to the default homepage and not the one I tried to set as my home page.

    I've tried multiple times to set my home page to Yahoo.com
    It works as long as I have Firefox open, but if I close Firefox and then re-open it, the home page has reverted back to the default home page, not the one I set.
    This has not happened before updating to 3.6.10.

    There are several possible reasons for it being reset, for details see [[Preferences are not saved]].

  • Assignment field in FB03 is updated with a TM PO, and not the material PO

    Hi Experts,
    I am facing an issue.
    Issue: The assignment field in accounting document generated during GR is updated with the TM PO number(Trade PO) and not the Material PO .
    this happens while Posting goods receipt in VL32N tcode.
    Please let me know what can be the issue.
    Thanks and regards,
    Meenakshi Raina

    Everytime we create a TM PO , the error occurs in account assignment the first time you do the Good issue.
    If you reverse the document and repost the Good Issue it works the correct way

  • How to save an XML file with a proper name and how to maintain the history?

    Hi All,
    As per the requirement, I have to remane the name of the XML file which is under the KM repository Userhome/personaldocuments based on the user logon information.
    I have created a Repository service for the same and following is the code for the same. The service is working, but only for the first entry in the XML form. Second onwards, the file does not get remaned to the preferred one.
    Request you to throw some light as what is wrong or missing in the code, so that I can follow the right approach. Many thanks in advance.
    // Code snippet is here//
    //Starts here//
    com.sap.security.api.IUser epUser;
                                            epUser = UMFactory.getAuthenticator().getLoggedInUser();
                                     String EntID = epUser.getUniqueName();
    IResourceContext resContext = null;
    try {
         resContext = ResourceFactory.getInstance().getServiceContext("cmadmin_service");
    } catch (ResourceException e1) {
              e1.printStackTrace();
    RID rid = RID.getRID("/userhome""/"EntID+"/Personal Documents");
    IResource resource = null;
    try {
         resource = (ResourceFactory.getInstance().getResource(rid, resContext));
    } catch (ResourceException e2) {
              e2.printStackTrace();
    ICollection collection = (ICollection)resource;
    IResourceList resourseList = null;
    try {
         resourseList = collection.getChildren();
    } catch (AccessDeniedException e3) {
              e3.printStackTrace();
    } catch (ResourceException e3) {
              e3.printStackTrace();
         for(int i=0;i<resourseList.size();i++){
              IResource res_new = resourseList.get(i);
                try {
                   res_new.rename("Address_new.xml");
              } catch (NotSupportedException e) {
                                  e.printStackTrace();
              } catch (AccessDeniedException e) {
                                  e.printStackTrace();
              } catch (ResourceException e) {
                                  e.printStackTrace();
    //Code ends here//
    Regards
    DK
    Edited by: DIPENDRA MOHANTY on Jun 5, 2009 5:20 PM

    Hi,
    The code seems ok.
    But you have mentioned about a KM Rep service, what service is that? which event it is listening to?
    Regards
    BP

  • How can I do the same as Windows Explorer with datemodified:11/6/2013 .. 11/13/2013 showing only changed files with path in tree and NOT every folder along the way as Finder seems to do by default? Thanks!

    I'm an Apple newbie.
    I'd like to be able to list each file in the "Desktop" tree (ie; on the desktop, or in any folder on the desktop, etc.), along with its path, that has been modified since a certain date.
    When I use Finder to do a similar search, I get tons of output including every folder in the path to the modified file, etc. Although I can view the path to the individual files in the output, I can't for example, order the output by path, etc.  Very difficult to sort through. I'd love to have output like the example above - just the filename and path for each changed file.  Possible?  Thanks in advance!
    Wayne

    The file structure is a little complex. I will use inbox as an example.
    Inbox (a large file with no file extension)
    Inbox.msf ( An index of inbox with tags etc. Can be deleted with only loss of tags)
    Inbox.sdb (a folder, indicating that the folder within Thunderbird has a sub folder.
    POP mail is stored in
    Appdata/Roaming/Thunderbird/Profiles/*.default/Mail/[Server name]/
    Local folder is stored in
    Appdata/Roaming/Thunderbird/Profiles/*.default/Mail/Local Folders/
    As long as you do not overwrite, you can copy and paste whole folder trees into local folders (stuff on your old computer under a mail account is best relocated to local folder and then sorted as necessary afterwards.
    Note that you should delete foldertree.json after making those sorts of copies (it forces a full refresh of the folder tree, no cache) and under no circumstances copy data with Thunderbird running. It can irrevocably corrupt things

  • Hi, I need some help. Since I have changed to windows 7 I cannot open raw files with my canon mk 5D. The files will not open in cs4. Can somebody advise me what to do. I have done updates on CS4 and still cannot open the raw files

    Can anybody advise me what to do as I am having problems opening raw files on CS4 since I have changed to windows 7. I am using a canon mk 5D.

    dave nutter wrote:
    I am using a canon mk 5D.
    Actually, you're not.  That's not an accurate description of any of the Canon 5D models.
    There are EOS 5D, EOS 5D Mark II, and EOS 5D Mark III models.  Which do you have, specifically?  Details will matter for this.
    If you have a 5D Mark III (three) it's too new and you will not be able to directly open files with Photoshop CS4.  You'll either need a newer version of Photoshop or to use the free DNG converter.
    -Noel

  • I want to download Firefox, but NOT have it as default browser, and not affect other users on the computer - is this possible?

    I want to install Firefox, and be able to use it on demand, whilst retaining Internet Explorer as default browser. Will I be able to use either browser as and when I wish?
    Thanks, and sorry for being stupid!

    Hi Tony,
    Thanks a lot - I thought that was the case, but needed to check!
    Will McAfee security talk to Firefox ok? Site Advisor etc?

  • Record locks created when user closes the Browser and not the Web Form

    Hi. We sometimes encounter the issue where a user updates a record, locking the record on the table, but then they unexpectedly closes the browser without saving by clicking the X in the upper-right of the browser window. Then when another user comes along and attempts to edit that record they get the message Unable to Reserve Record. The orphaned record lock eventually does seem to clear itself out, but that can often take 15-20 minutes.
    Is there any way to speed this up? Or to pragmatically keep this from occurring? Either on the database side or with some code in a particular application?
    Please let me know your thoughts. Thanks in advance.

    If a user closes the browser window the forms runtime on the application server holding the locks is in most cases still up and running. The FORMS_TIMEOUT controls on how long a forms runtime on the server is up and running without the client applet not sending a heartbeat (See MOS note 549735.1). By default this is 15 minutes which would explain your locks being held 15 minutes.
    You could decrease the FORMS_TIMEOUT in the default.env, so the forms runtimes get cleaned earlier and thus the locks get released earlier.
    Note that if you have blocking client_hostcalls with webutil this might be a problem, as it prevents the forms applet from sending the heartbeat and after the FORMS_TIMEOUT passed while the forms applet is blocked the forms runtime on the server gets closed.
    cheers

  • How do I get firefox version 36 to play from audio from our selected default program and not the embedded quicktime player?

    In our newsroom environment, staff prefers to have MP3s from various download sources open directly in an outside program's window (in this case Goldwave is the preferred program). That being said, with the newer version (36 specifically) the behavior of the program has changed so that MP3s are opening in a separate browser tab, regardless of the preferences in the "Applications" window of the Options as well as the program defaults within Windows. Previous adjustments made to about:config media.windows-media-foundation.enabled as well as media.directshow.enabled and setting to "False" no longer solve this issue.

    hi tjh1211, please leave "media.windows-media-foundation.enabled" and "media.directshow.enabled" on their default value and switch "media.play-stand-alone" to false instead...

  • Why does my 3rd gen ipad only charge with an iPhone charger and not the 10w charger it came with?

    Im only asking this because it's annoying me , but my 3rd gem ipad will not charge with its 10w charger ? It will happily charge with my iPhone charger, and my iPhone will happily charge with the 10w charger but why won't the ipad charge with the charger it came with ? Any ideas ?

    The cable for your 10W charger may be defective.

  • Y Axis label color inherits Pen color and not the default Label color.

    Hi,
    How do I enforce my Y Axis Label to taken the default color specified in the iChart Y-Axis Label Color property instead of picking it from the Pen color selected from the legend? I have a Y-Axis Label called "Total Stock", I can very well change the Label text using method
    document.TestChart.getChartObject().setYAxisLabel("Label from code");
    But when I use a similar
    document.TestChart.getChartObject().setYAxisLabelColor(Color);
    property, I dont see the color change on the screen. But when I get the color using a getYAxisLabelColor() method , the specified input Color is set. My Label in the Y-Axis, always inherits the Pen color of the selected Legend Item, by default the first Item color on Page Load.
    Settings done in the iChart:
    Use Selected Pen for label : Unchecked
    Y Axis Label Color: #000000
    Y Axis Label : Total Stock
    Show Y Axis Label: Checked.
    I appreciate your help,
    Ajitha

    Jeremy,
    I tried the method you mentioned...
    document.TestChart.getChartObject().setYAxisLabelColor(document.TestChart.createColor("#000000"));
    But I still dont see a change in the Label color.
    Another finding is, when I try to alert the Label color on load of the page or during the creation of the applet, I see the label color on the alert is not the pen1color but the default Label color that is set in the display template. I assume that the legend's default selection, overwrites the Label color with the first pen color, but I could not get it with the getYAxisLabelColor() method, even though I see it on the screen.
    Thanks!
    Ajitha

  • Cannot open XML file with Excel2010 but was able with Excel2007

    Hi,
    We have crated couple of dashboard on BW query by using XML Map(BSP Link) previously with Excel 2007. Just recently we have migrated from MS 2007 to MS 2010 for some other technical purpose(Ex: - Power Pivote). Now when I am trying to add BSP link using XML map in Xcelsius, which is using Excel 2010, I am getting below error.
    "cannot load the specified XML or schema source"
    Same link can be open by my team mate, who is still using Excel 2007.
    do we need any additional setting in Excel 2010 to use XML map?? your quick help will be truely appreciated.
    Regards,
    Ashish

    http://answers.microsoft.com/en-us/mac
    iMac refurb (27-inch Mid 2011), OS X Mavericks (10.9.4), SL & ML, G4 450 MP w/Leopard, 9.2.2

Maybe you are looking for

  • How to delete an element from a template??

    I bought a dreamweaver template and there's a menu that goes across the top of the screen but I don't know how to get rid of it?? I don't see any coding for it in dreamweaver it just kinda shows up. Link to page: http://ramclutches.com/newsite/index.

  • Errors occurred during installation before itunes could be configured

    i can't  install ITunes in my win 7 it replay by errors occurred during installation before itunes could be configured

  • Error code (-9808) when trying to download anything on itunes

    Anytime i try to purchase a song on my iTunes a message pops up and it says there has been an unknown error code (-9808) and I'm unable to complete the purchase and download.

  • IE vs Firefox

    I'm having trouble with the target="_blank" command in Firefox. I am using this command to open links in a new window and it works in IE but not in Firefox. is there another command that works in both. I want to make sure visitors go back to the prev

  • Final Cut  4.5 on a Mac Pro

    Hi guys, New here. I've been using my FCP 4.5 on an old G4 for ages and now am installing it on my new Mac Pro OS X Leopard. Installed okay - but getting message that I need a Power Mac G4/350 and a AGP card. How do I get over this? Love you all Keit