Run file in Windows in this file default program

Hello
I want run file in my Java program. In example I click in my Java program on the "Hello.doc" text and it must run Microsoft Word. I try use:
try {
    Runtime.getRuntime().exec("start c:\\file\\Hello.doc");
} catch (IOException ex) {
   System.out.println(ex);
}And in my console I have throws:
java.io.IOException: CreateProcess: start C:\file\Hello.doc error=2
Wher is a bug?
Thenks to help

Try this:
try {
    Runtime.getRuntime().exec("cmd /c start c:\\temp\\Test.doc");
} catch (IOException ex) {
    System.out.println(ex);
}       

Similar Messages

  • PSE 10 is not shown in windows 8 "set your default programs"

    PSE 10 isn't shown as an option in windows 8 "set your default programs".
    Selecting individual file types doesn't help me much when, apart from .jpgs
    and .tiffs, I don't know all the file types PSE 10 can open and I want it to open
    everything it can.  I do not want Windows 8 opening my stuff.  Any ideas?

    See if this blog addresses your issue: http://psekb.blogspot.in/2013/03/how-to-change-default-application.html
    ~Surendra

  • .msg files open in new tab or window, not with the default program

    Hello,
    I am having an issue with .msg files not opening with the default program, Outlook. They are opening in a new tab and it is just a bunch of gibberish from the email header. Does anyone know how to force IE to open the .msg files in Outlook? They open fine
    in Chrome and Firefox.
    Thanks for your help!

    Hi,
    First I suggest we take a try in IE with no-addons.
    Follow the steps below:
    1. Click Start -> All Programs -> Accessories -> System Tools -> Internet Explorer (with no add-ons)
    2. Press Shift, then right click Internet Explorer icon on taskbar, select run as administrator;
    Please also take a verify that if the outlook is set to the default open program of .msg files:
    Control Panel\All Control Panel Items\Default Programs\Set Default Programs, find the .msg file and take a look.
    Then we may try to use process monitor to track the root cause of this issue:
    The download link here:
    Process monitor
    And here is
    a blog talking about how to use it:
    Process Monitor - Hands-On Labs and Examples
    Hope this may help
    Best regards
    Michael Shao
    TechNet Community Support

  • I am unable to have Elements 12 recognized by Windows 7 as the default program for the jpg famuily of files. What to do?

    Windows 7 does not recognize Elements 12 as a candidate default program for jpg files. Any suggestions?
    The Elements 12 is authorized and works properly but does not show up in the Control Panel Default programs. (it is listed as a loaded program elsewhere in the Control Panel.)
    I have tried Uninstalling it and re-installing it several times with no success. I have used nearly all previous versions of Elements with no problem.

    Hi Robbie,
    The editor program is NOT under the organizer path as you mentioned in your last message. The actual editor program is at the location I gave in message #1 i.e. as follows
    "C:\Program Files (x86)\Adobe\Photoshop Elements 12\PhotoshopElementsEditor.exe"
    The one under the organizer is actually the Welcome screen which you have probably set up to go directly to the editor.
    If you go to the Open With screen I showed in message #3 and browse to the actual editor as given above, it should show up in your list.
    If it doesn't, then Windows is playing up again - and we have to take extra steps.
    Brian

  • Indesign CC + Windows - can't change default program

    I have upgraded to CC.  I have set all default programs to open the various file types except Windows will NOT let me set InDesign as the default for opening indd files.
    I can open indd files from within InDesign no dramas, but just cannot associate the program with the file type.
    I've tried two methods: 
    1.   After choosing 'open with' I can browse to, and select InDesign to open the program (see below), but then nothing happens and it InDesign is not added to the list of programs I can choose from.
    2.  I have tried going through control panel + "Associate a file type or protocol with a specific program" - same thing happens I can select .indd and browse to InDesign but wont let me actually set that program to open this file type.

    I'm having the same issue.
    I did not uninstall a previous version after installing CC, and CC was the most recent version of InDesign I installed (and I believe there's been at least 2 InDesign CC updates that I've installed since the initial installation).
    I've browsed to the InDesign exe, as sc_rpa did in #1 above, and it never gets added to the application list.
    I've tried going through the control panel, same thing.
    I've uninstalled and reinstalled InDesign (several times, now)... and just can't get it to work. For some reason, it's as if Windows thinks InDesign.exe is not a true executable/application.
    It's really affecting convenience and efficiency for me, not being able to open my .indd files directly from the file manager.
    Has anybody figured this out, yet?
    I'm on the 64-bit Windows 7, if that might make a difference.

  • How to add  acrobat to windows 7 home pro default programs list

    I have lost the ability to set Acrobat as the default program for opening pdf files.  I can do it with manual "open with", however I cannot set it as the default to do it automatically through any of the windows options.  I found that Acrobat is not listed as one of the windows default rpgrams and would like to be able to add to that list.  Does anyone know how to do that?  I assume it requires a registry change but I don't know where.
    Thanks for your help
    Jerry

    The last item about PDF Maker files missing is another matter altogether. You really need to indicate what version of OFFICE you are using (usually where PDF Maker is used). With AA9, you can only use PDF Maker with OFFICE 2007 or earlier. AA9 is not compatible with OFFICE 2010. So adequate information is needed to give an answer. I suspect that you may have OFFICE 2010 or are using a 64-bit version of OFFICE that is also a compatibility issue for PDF Maker unless you upgrade to AA X.
    The last screen Rufus shows is not available in Win7. They moved that functionality to the Control Panel as I indicated in an earlier post. But you would in a similar manner go to the set Associations and see a long list of file types. You would select the PDF type and then edit the association. You would select Acrobat.exe and not AcroRd32.exe as your default association for PDF files. Reinstalling Reader just messes things up and should generally not even be installed when you have AA9. AA X is the first version that really has allowed both Acrobat and Reader due to some compatibility issues. Usually it is best to just stay with Acrobat and not have Reader on your system. If you do uninstall Reader, you will likely have to do a Repair to Acrobat.

  • Loading file default program icons

    i need to be able to specify a file extention, then get the operating systems default icon for any file with that extention.
    how can i do that in air?
    thanks
    marcidus

    accessing the OS icon database is a very important part of UI development with user guided file handling,  if anyone knows anything about  how it can be done, it would be most useful.  filezilla does it, it recognises extentions and relates them to the OSs default applications for those extentions.  how does it do it?

  • Set pages to be default program for *.doc files

    Is it possible to set pages to be the default program which my computer will ALWAYS use to open a MS word document? In windows i could set default programs for specific file types, e.g. .jpg, .mpg, mp3. I did not have to assign a program to open the program every single time. As far as I can tell , I have had to request pages to open my word documents every time i open a word doc. for the first time. Although I can set pages to be the default program for that one file, i want it set to ALWAYS OPEN ALL WORD DOCS. , until further specified. Any suggestions?
    thx.

    Highlight a known Word document in the Finder, highlight it & choose Get Info from the File menu. In the Get Info box, click the triangle next to "Open With." Click on this drop-down menu & choose Pages. If Pages is not a choice, choose "Other" & navigate to the Pages application. Now click the "Change" button under the text that asks if you want to open all documents like this with Pages. You can then double-click the Word documents & they will open in Pages. Note that the icon for the Word files will have a plain, white icon.

  • How to suppress "default program" question from trace32

    Hello,
    i use the micrsoft logviewer-tool "trace32" a lot.
    On each client it asks me "do you want this as default program"
    Each time i click on "no"
    I have not found a commandline-switch so i hope you can help me.
    Cheers
    mr snipes

    Hi,
    for trace32 it was
    Windows Registry Editor Version 5.00
    [HKEY_CURRENT_USER\Software\Microsoft\Trace32]
    "Register File Types"="1"
    (set to 0 if trace shall not be standard)
    Yes, i am mostly using cmtrace - despite its bad behaviour of ignoring  CRLf
    And unfortunately CMtrace has the same behaviour as trace32.
    The entry for  trace32 from above is also being spawned from cmtrace (probably for downward-compability)
    I think many people would find it cool if a simple /nodefault or whatever switch would avoid playing with the registry.

  • What is the default program to run windows batch files?

    I am working on windows 7 and I found that "notepad" was set as the default program for opening my .bat files. when I try to execute the batch file by double clicking, it is opened by notepad.
    I have tried setting cmd.exe as the default program, it just opens the command prompt.
    What is the default program I should set for executing .bat files?
    I hav also tried using assoc .bat = batfile. The batch file runs fine from command prompt.

    This is not a scripting question.  It is a break/fix issue.  Contact you support person or Admin for assistance fixing this.
    http://www.sevenforums.com/general-discussion/53877-bat-files-open-notepad-instead-running-help.html
    ¯\_(ツ)_/¯

  • I am running Vista and Windows Mail, I can not open PDF files when in Windows Mail, I must save to Desktop first, this has changes recently and I do not know why or how to fix

    I am running Vista and Windows Mail, I can not open PDF files when in Windows Mail, I must save to Desktop first, this has changes recently and I do not know why or how to fix.
    Why after 6 year's this has changed?
    I would like to open PDF's straight from Window Mail.

    Good day Jeff.
    I am running most current Adobe Reader X.
    Tks Mark

  • When running setup, I get"This file does not have a program associated with it for performing this action. Please install a program or, if one is already installed, create an association in the Default Programs control panel.

    whe I try to install Firefox 4.0.1, I get a Red X message. ""This file does not have a program associated with it for performing this action. Please install a program or, if one is already installed, create an association in the Default Programs control panel. Is there a fix?

    I Did that. When I try to install, I get the same message. I have come to believe this is a windows 7 or IE 9 problem. I also have active X problems that I can not resolve. I can not open Gmail also

  • I have an old file that was made by macromedia flash,but I can't run this file in my Windows 7 64-bit ,while I can run it in Windows XP 32-bit

    I have an old file that was made by macromedia flash,but I can't run this file in my Windows 7 64-bit ,while I can run it in Windows XP 32-bit

    Hi momi macrom,
    Have moved your post to the Flash forum. Experts here are better placed to help you.
    Thanks,
    Preran

  • Getting this error while opening a folder : This file does not have a program associated with it for performing this action. Please install a program or, if one is already installed, create an association in the Default Programs control panel

    Hi,
    While trying to open a folder on my Windows 7 Home Premium, an error comes "This file does not have a program associated with it for performing this
    action.  Please install a program or, if one is already installed, create an association in the Default Programs control panel." I tried searching on the net but did not get great support for the issue when it happens with folder opening.

    Hi Nikunj Shah,
    First, I suggest you download
    Microsoft Safety Scanner or
    Malicious Software Removal Tool to run a full scan.
    The error messages here seems to be caused by the corrupted registries, which related with the folder association.
    You may take a try to merge the following registry settings to reset the folder association, before that, remember to backup your registry settings first:
    How to back up and restore the registry in Windows
    Copy and paste the following commands into Notepad, and save it to a .reg file:
    =================
    Windows Registry Editor Version 5.00
    [HKEY_CLASSES_ROOT\Folder]
    "ContentViewModeLayoutPatternForBrowse"="delta"
    "ContentViewModeForBrowse"="prop:~System.ItemNameDisplay;~System.LayoutPattern.PlaceHolder;~System.LayoutPattern.PlaceHolder;~System.LayoutPattern.PlaceHolder;System.DateModified"
    "ContentViewModeLayoutPatternForSearch"="alpha"
    "ContentViewModeForSearch"="prop:~System.ItemNameDisplay;System.DateModified;~System.ItemFolderPathDisplay"
    @="Folder"
    "EditFlags"=hex:d2,03,00,00
    "FullDetails"="prop:System.PropGroup.Description;System.ItemNameDisplay;System.ItemTypeText;System.Size"
    "NoRecentDocs"=""
    "ThumbnailCutoff"=dword:00000000
    "TileInfo"="prop:System.Title;System.ItemTypeText"
    [HKEY_CLASSES_ROOT\Folder\DefaultIcon]
    @=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
      00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,73,00,68,00,\
      65,00,6c,00,6c,00,33,00,32,00,2e,00,64,00,6c,00,6c,00,2c,00,33,00,00,00
    [HKEY_CLASSES_ROOT\Folder\shell\explore]
    "MultiSelectModel"="Document"
    "ProgrammaticAccessOnly"=""
    "LaunchExplorerFlags"=dword:00000018
    [HKEY_CLASSES_ROOT\Folder\shell\explore\command]
    "DelegateExecute"="{11dbb47c-a525-400b-9e80-a54615a090c0}"
    [HKEY_CLASSES_ROOT\Folder\shell\open]
    "MultiSelectModel"="Document"
    [HKEY_CLASSES_ROOT\Folder\shell\open\command]
    "DelegateExecute"="{11dbb47c-a525-400b-9e80-a54615a090c0}"
    @=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
      00,5c,00,45,00,78,00,70,00,6c,00,6f,00,72,00,65,00,72,00,2e,00,65,00,78,00,\
      65,00,00,00
    [HKEY_CLASSES_ROOT\Folder\shell\opennewprocess]
    "MUIVerb"="@shell32.dll,-8518"
    "MultiSelectModel"="Document"
    "Extended"=""
    "LaunchExplorerFlags"=dword:00000003
    "ExplorerHost"="{ceff45ee-c862-41de-aee2-a022c81eda92}"
    [HKEY_CLASSES_ROOT\Folder\shell\opennewprocess\command]
    "DelegateExecute"="{11dbb47c-a525-400b-9e80-a54615a090c0}"
    [HKEY_CLASSES_ROOT\Folder\shell\opennewwindow]
    "MUIVerb"="@shell32.dll,-8517"
    "MultiSelectModel"="Document"
    "OnlyInBrowserWindow"=""
    "LaunchExplorerFlags"=dword:00000001
    [HKEY_CLASSES_ROOT\Folder\shell\opennewwindow\command]
    "DelegateExecute"="{11dbb47c-a525-400b-9e80-a54615a090c0}"
    [HKEY_CLASSES_ROOT\Folder\ShellEx\ContextMenuHandlers\BriefcaseMenu]
    @="{85BBD920-42A0-1069-A2E4-08002B30309D}"
    [HKEY_CLASSES_ROOT\Folder\ShellEx\ContextMenuHandlers\Library Location]
    @="{3dad6c5d-2167-4cae-9914-f99e41c12cfa}"
    [HKEY_CLASSES_ROOT\Folder\ShellEx\ContextMenuHandlers\Offline Files]
    @="{474C98EE-CF3D-41f5-80E3-4AAB0AB04301}"
    [HKEY_CLASSES_ROOT\Folder\ShellEx\DragDropHandlers\{BD472F60-27FA-11cf-B8B4-444553540000}]
    @=""
    [HKEY_CLASSES_ROOT\Folder\ShellEx\PropertySheetHandlers\BriefcasePage]
    @="{85BBD920-42A0-1069-A2E4-08002B30309D}"
    [HKEY_CLASSES_ROOT\Folder\ShellEx\PropertySheetHandlers\Offline Files]
    @="{7EFA68C6-086B-43e1-A2D2-55A113531240}"
    [-HKEY_CLASSES_ROOT\Folder\ShellNew]
    [HKEY_CLASSES_ROOT\Folder\ShellNew]
    "Directory"=""
    "IconPath"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,\
      74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,73,\
      00,68,00,65,00,6c,00,6c,00,33,00,32,00,2e,00,64,00,6c,00,6c,00,2c,00,33,00,\
      00,00
    "ItemName"="@shell32.dll,-30396"
    "MenuText"="@shell32.dll,-30317"
    "NonLFNFileSpec"="@shell32.dll,-30319"
    [HKEY_CLASSES_ROOT\Folder\ShellNew\Config]
    "AllDrives"=""
    "IsFolder"=""
    "NoExtension"=""
    ==================
    Once done, right-click the REG file and choose Merge. Alternately, you can open the Registry Editor and then using the
    Import option from the File menu, to merge the REG file contents.
    Let me know if you need any further help.
    Best regards
    Michael Shao
    TechNet Community Support

  • System file not suitable for running msdos or windows files ???

    Please help...
    I download the itunes 6.0.5 setup.exe file.
    I open it and I see a pop up with Quicktime and Itunes on it. It quickly loads and then a new application opens (a C:// black box
    It quickly gets an error (16 Bit MSDOS Subsystem Box) error reads that the system file is not suitable for running msdos or window files. Close or Ignore (neither allow me to load 6.0.5
    I am using windows xp

    You use probably a UFS file system, right ? Then in this case, use the "-i" option with a value less as 8192. 8192 is the default value for a UFS filesystem that is between 3GB and 1 TB size.
    But if you want to store 10M of files, UFS will be limited to 1M per TB : 64-bit: Support of MultiterabyteUFS File Systems (System Administration Guide: Devices and File Systems)
    In this case, use instead UFS a ZFS filesystem that supports 2^48 entries !!!

Maybe you are looking for

  • Can we show information messages after triggring IDOC's in background

    Hi friends, Iam executing one custom transaction for sales cycle in background, in that iam trigging IDOC's, user are getting the messages like 1. Idoc No: 0000014254 despatched to client - 2. 1Output  were processed. 3. 1 IDOC's selected. user has t

  • Creating a photo book and photo in RIGHT side pane are not in order. Making it hard to make my book

    I am trying to make a Book. I have alot of photos and i dont like how iphoto is not putting them all in. So i created my own book and added alot of pages with 4-11 pic. average per page. however, when i try to add my photos from the right side panel

  • Variable frequency counter output

    I found this example of how to vary the frequency of a counter output, but it appears this is not supported and i receive the following error. Can anyone tell me if there is an alternative method at all? my device is a usb6341 which has 4 COs thanks

  • Dvd burn interrupted

    I can't get my video to burn to a DVD.  It keeps giving me the message that the DVD Burn has been interrupted.  This is getting very frustrating. I am using a HP computer, Windows 8, Core i7, Adobe Premier Elements 13.  I download QUICKTIME 7 onto my

  • Is it possible to call event within even in Java

    I want to call Mouse Move event in Mouse dragg event, is it possible. Could you please give reference on how to do that.