Getting path to application associated with file type

Hello,
I'm looking for a platform-independent way to get path to application associated with given file type. Desktop API introduced in JSE 1.6 seems to do this, but it only lanuches the app.
Any suggestions will be apprecieted

Okay then, how can I open the file in it's associated
application AND get the Process object of app's
instance?If it doesn't bother you that the app will only work on windoze, then you can use the shell "start" command on the file.
Process proc = Runtime.getRuntime().exec(new String[]{"cmd", "/C","start",filePath});However waitFor() will only wait for the process to be launched, not completed. Since your program doesn't know what Windoze will choose to launch, this makes sense.

Similar Messages

  • Apps not associating with file types

    We have downloadd the CC version of Illustrator and Photoshop, and if we double click an .ai, or .psd file, they do not automatically open up and instead the windows files association dialogue opens up.. and they not not appear in any file associartions, even if we then file the .exe file, it still does not link. This happens on a W7 computer and a W7 laptop. Is this a bug?... how is it fixed?

    Please stop saying that - it IS a bug. The installer script for CC 2014 and the uninstaller script for CC "original" have a fundamental mismatch in their use of file class IDs, so if you install a CC 2014 program then uninstall the CC version, it will remove the association and leave the class pointing to the old ID - which the new 2014 executables are not registered for because at the time they were installed, they saw an existing class handler and silently ignored it. They should have forced ownership as they would do in a fresh install, but there's a SNAFU in the script.
    The way to do it is to treat the new version as an old-school replacement, not an in-place upgrade:
    Uninstall the CC 'original' apps, choosing to keep your preferences. Your file associations will show the old class ID (such as "Adobe.Illustrator.17").
    Restart the CC Desktop App so it recognizes the changes (no need to actually reboot the machine).
    Install the new CC 2014 versions - they will sense their file assocations are orphaned and correctly capture them. Any preferences lest behind will be imported, but plugins won't.
    If you've already done it the "wrong" way - installed CC2014 apps then removed the older ones - and your associations are borked, uninstall them and reinstall them - again choosing to keep your preferences. That will convince the install script for the 2014 releases to take over the class IDs again. You cannot have both versions of a CC app installed at the same time and easily switch the class registrations
    The workaround being suggested - to manually associate an extension with the executable - doesn't solve the problem, as when installed properly each application actually registers version-aware handlers, so you get a different icon depending on the version of the file you're looking at (see screenshot below). That visual warning is really important for a number of users and cannot be manually implemented.
    Mylenium wrote:
    This is not a bug.

  • Testing for applications associated with a file type

    Dear contributors,
    while trying to open a simple *.txt file via java.awt.Desktop.open(File)
    the IOException is thrown. According to Javadoc there is "no associated
    application or the associated application fails to be launched" in this
    case. Interestingly the Desktop class does not provide methods to test
    for particular file type registration, just for the "support" of a generic
    Desctop.Action. Colud you please illuminate how to check, whether a file
    extension / file type / mime type has an associated application in a platform
    (in)dependent way at least for "opening" ?
    OS: Linux, 2.6.24-22-generic, x86_64
    JDK: 1.6.0_07, 64 bit
    Many thanks
    Jaro Pullmann

    If you make the call and an exception is thrown, then there is not application associated with the file type--otherwise I believe you need to do some registry work if you do not want a pretest.

  • Calling the application associated with a file

    Is there anyway to run the associated application of a file type, or a way to know it? I need that given a certain file, execute the default viewer or editor for that file type. How can I do this in windows and linux?
    Thanks a lot!
    Luis Javier

    On windows I know if you call Runtime.exec("c:\myfile.html"), it will invoke the associated application for that file type (IE).
    David

  • How do you make console apps the default application for a file type?

    I have a console movie player, mplayer, that I like a lot. I've compiled it from source on my intel core2 macbook pro and it works fine. There is no gui, but to play movie files you open up a terminal and type the command mplayer /path/to/file. I would like mplayer to play a movie file automatically when I double click on the file, but I can't seem to figure out how to do it. I tried setting it in the file info dialogue, but when I go to the path of the binary I want, it is not selected. How can I set a console app as my default application for my file type?

    there is a GUI mplayer for OS X. why don't you use it instead of the command line one?
    if you insist on using the command line mplayer then the only way to do this is to put a GUI wrapper on it. this can be done with automator or apple script for example. but really, why don't you just use the GUI mplayer?

  • Applications associated with workstations not working

    Hello,
    I have onld zen 7.x, on netware.
    Applications associated with workstations not working or appearing in one container. Not sure if it every worked. Apps work fine with users.
    I am in a bind, since I need to get the app out in the workstation space.
    It maybe rights or simple install error with the ZEN from the begining.
    thanks for any help or ideas.. Yes I know I need to get to Zen 11.
    Phil

    PhilJannusch,
    > Applications associated with workstations not working or appearing in
    > one container. Not sure if it every worked. Apps work fine with users.
    >
    > I am in a bind, since I need to get the app out in the workstation
    > space.
    Please tell us more as "not working" can mean a lot of things. So:
    Are they user or workstation associated?
    Are those for whick they do not work (users or workstations) all in the
    same container?
    In what way do they not work?
    Any errors?
    Anders Gustafsson (NKP)
    The Aaland Islands (N60 E20)
    Have an idea for a product enhancement? Please visit:
    http://www.novell.com/rms

  • When I attempt to Extend a PDF document via my LiveCycle server I get the error"Application Alert" The file could not be saved. Are you sure you want to lose your results?

    When I attempt to Extend a PDF document via my LiveCycle server I get the error"Application Alert" The file could not be saved. Are you sure you want to lose your results?
    I can login fine via this address.
    http://[Server Address]:[Port Number]/ReaderExtensions
    And I can apply the extension successfully, but when I attempt to download I receive the error above.
    Application Alert" The file could not be saved. Are you sure you want to lose your results?

    Please check the supported version of flash player on your client machine for LiveCycle : http://bit.ly/1wGD9t4
    Upgrade or downgrade it accordingly.
    Thanks,
    Wasil

  • Need to avoid header When using GUI_DOWNLOAD with file type "DBF"

    Hi ,
    I am downloading internal table to excel on the desktop using GUI_DOWNLOAD with file type "DBF".
    Internal table I use do not have any header.
    But I do see the header in the downloaded file.
    It displays 1 row as " F1  F2 F3..ETC" heading for each column.
    Is there any variable we need to set to suppress header.
    Thank you,
    Kumar

    Hello Dilip,
    I tried using GUI_DOWNLOAD with FILE TYPE as "DBF", and i see the problem as mentioned. My question to you is:
    1. Why do you need 'DBF' format?
    2. Is it required to save the file as '.CSV'? Can you not try to save in '.XLS' file?
    Plz revert back.
    BR,
    Suhas

  • Need to remove header When using GUI_DOWNLOAD with file type "DBF"

    Hi ALL,
    I am using GUI_DOWNLOAD function module to downlaod data to csv file . I have taken FILE TYPE as "DBF" . After download , I have found data is downloaded along with a default header . Now how can I avoid Header while downloading.
    Please help me to solve this problem.
    thanks and regards,
    Dilip
    Edited by: dilip kumar on Jun 9, 2009 11:51 AM

    Hello Dilip,
    I tried using GUI_DOWNLOAD with FILE TYPE as "DBF", and i see the problem as mentioned. My question to you is:
    1. Why do you need 'DBF' format?
    2. Is it required to save the file as '.CSV'? Can you not try to save in '.XLS' file?
    Plz revert back.
    BR,
    Suhas

  • Partition with file type & size.

    Hello All,
    I need to install SuSE Linux Enterprise Sever 8 prior to Oracle 10g.
    I have 136GB of Hard Drive.
    My RAM is 3GB.
    Could anyone suggest me idol file system/partition with file type & size?
    I can create partition on my SLES installation.

    We are using raid5.
    But I can see only one hard drive.
    Do you think its ok to have only three partitions?
    what about /? (root)
    what file type I should used? ext 3, ext 2 or Resiser?

  • SQL Developper Version 4.1.0.19: cannot open sql files with file type .pck

    Hi
    I can't open sql files with file type .pck. They are opened as a package. The icon is a package too. (Worked fine in 4.0)
    My settings:
    Thanks for any help

    Thanks, but that doesn't help
    To specify it more precisly: I can open such a file, but it is not opened as a sql file. The icons you see above left are the icons of the files (not of the packages).
    Greetings
    Ovi

  • I want to edit the application associated with pdf files, but the pdf file type is not available on the Applications tab under edit preferences. How do I add file types?

    I am running Firefox 5.0 (Mozilla Firefox for Ubuntu canonical - 1.0) under Kubuntu 11.04.

    Thanks jscher2000, I tried your suggestion, but no joy (as expected). None of the extensions were .bin, and in fact, I can't find a single listing for handling the .bin extension in the entire (unfiltered) list.
    That's why I'm so confused. Where is Firefox getting the name "VLC.bin (default)" from in the first place?
    cor-el, I checked out the link that you posted.
    I don't have an entry for "browser.download.pluginOverrideTypes" and the entry "plugin.disable_full_page_plugin_for_types" was empty (default setting).
    My bad, but I forgot to mention in my first post that I had also tried renaming the mimetypes.rdf file in my "Application Data\Mozilla\Firefox\Profiles\xxx.default\" to .old to no avail.
    Firefox created a new, almost empty file, but it didn't change the behavior for .bin files. I removed the new file and put the old file back in place after determining that clearing the file did not help, since I am otherwise happy with my current file-type options.
    However, since the option to "Always perform this action" is grayed-out, I am looking into the possibility that the website is sending a misconfigured MIME type or is assigning "Content-Disposition: attachment" to the download. What's odd, though, is that I've never had problems getting binary files from the site in the past, and the problem started when the VLC player was installed.
    I'll post back after I check into the server header data.

  • How to change default application associated with some mime types?

    When we install some new program, for example GIMP, I assume the newly installed program is added to some mime type database, and the /usr/share/applications/mimeinfo.cache file is automatically generated.
    Using my example, GIMP will be the default application for all its registered mime types, even application/pdf. I surely don't want this to happen, and I surely don't want to create all kinds of files that GIMP registered and right click on them and choose Properties and then change it in the Open with... tab. I want to systematically de-prioritize GIMP so that it will not override my previously assigned default applications.
    I wrote a script to modify the mimeinfo.cache file, and it seems to work great. However, after a reboot or upgrade or something I didn't notice, the default application of application/pdf is reconfigured to GIMP. I think the cache suffix of the file indicates that it is just a cache and may be changed by system unnoticed. So I am looking for a new way to change the default applications.
    As far as I know or guess from the phenomena, there should be some system utility that generates the mimeinfo.cache file, it seems to parse all the *.desktop files under /usr/share/applications and register them to certain mime types accordingly. The sequence of the *.desktop files get parsed seems to be related to the time the application is installed, and the newly installed applications seems to be parsed later and inserted in the front of the application list or be parsed earlier and appended to the application list. Is there some place I can change the sequence of the parsing? Or is there some place I can change the behavior of the system utility?
    I know that I can populate my ~/.local/share/applications/mimeapps.list to override the system wide defaults, however, I want a more elegant way to this.
    Any opinion on this is welcomed.
    Last edited by AugustePop (2010-05-14 05:47:15)

    Ah, right. Don't know what DE you are on, but in Gnome:  right-click a (e.g. pdf) file -> Preferences -> Open with.
    All Applications listed there will be available from the right click menu, the marked one will be used on double-click.
    errgrh...
    I surely don't want to create all kinds of files that GIMP registered and right click on them and choose Properties and then change it in the Open with... tab. I want to systematically de-prioritize GIMP so that it will not override my previously assigned default applications.
    I guess what I am trying to propose is this: "de-prioritize" GIMP in its .dekstop file for the types you dont want it to be associated with, and manually add it back in through "Open With" for the file types you want it to be an option. Not sure if this is solving anything for you though
    Last edited by hokasch (2010-05-14 10:28:57)

  • Associating Application Icons with Files

    I just moved about a Gigs worth of files over from my G4 to my Wallstreet. The .pdf files do not obtain the Adobe Acrobat Reader icon until I actually open the file. Is there a way to change all the files icons at once without opening them all?

    Hi, Kirk -
    OS 9 uses embedded File Type and Creator codes in order for Finder to know how to handle a file when it is double-clicked, and to know what icon to use for it. OSX does not use those codes; it may be that they are not being added to the file until the file has been opened by the program.
    There are some utilities available which can be used to change those codes, and may be able to fix those files. The one I'd recommend is FileBuddy.
    With FileBuddy you can create a droplet, a small mini-app designed to change file characteristics in a specified way - you can then drop a folder full of files onto the droplet, and all files in the folder will be changed to match the settings in the droplet.
    To use FileBuddy for that, you will first need to acquire the correct File Type and Creator codes. Drop a 'good' file, one with the correct icon, onto FileBuddy's icon. FB's Get Info window will open. At the bottom center of that window will be a couple of data blocks containing the File Type and Creator codes for that file. Write those codes down - note that all File Type and Creator codes are exactly four characters in length, and may contain numbers and special characters (such as a space) in addition to letters; and that the characters are case sensitive (upper and lower case are important). Close that window.
    Now drop one of the generic files of the same kind onto FileBuddy. In FB's Get Info window, change the File Type and Creator codes to match the ones you copied previously. Once you have done so, the droplet button should become active - it's the leftmost of the row of samll icons near the top of the Get Info window. Click it, name the droplet something appropriate, and complete the creation of the droplet.
    Then test it with a copy of one of the generic files. If it works okay, you can then drop an entire folder of such files onto the droplet for mass fixing.
    Be sure you do not have a stray other-kind of file in that folder, because all files in the folder will be changed to match the settings in the droplet.
    For future importation of files, try adjusting the file/program linkages in the File Exchange control panel, particularly those in the PC Exchange section; and the similar settings in the Internet control panel (Advanced tab > File Mappings). I'm not sure which of those settings will be used by the OS when files are brought in by TCP/IP.

  • Associating a file type with TextEdit

    Hi all!
    Our program creates some dictionary files with a unique file extension, and I wondered if it is possible to associate these with TextEdit.app programmatically?
    I tried updating the Info.plist (manually) in TextEdit.app to incorporate our file type, re-started, but it still says 'there is no default application specified' to open the document. Can anybody help me?
    Kind regards

    Thanks for your response. I looked into that one, the problem with it is that it is local to each user and it's a bit tricky, if impossible, to amend it correctly with defaults.
    The link I posted above works a treat, and the relevant block of code can be added to TextEdit's plist file via a shell script with cat
    Message was edited by: DeadGoodDave

Maybe you are looking for

  • Airport express refuses to connect to extreme network.

    I have an extreme network set up with 2 g5 imacs connected to a router. I wish to add an express base station to wirelessly connect to the established network as a client so I can stream music from either imac to the remote speakers plugged into the

  • Doc.no in serial management screen

    hi, i want to retrive the doc.no whatever it may be for example PD 2, PD 5 in some other screen. can i know how to do that. its urgent. Regards, Puneeth

  • RRA not functioning in Consumer Portal...

    Dear SDN'ers. We have two portal implemented each on each own host. I have done what is necesary to have  Portal A as the consumer and Portal Z as the producer. Both portals reside in the same domain. Portal A Netwaver 2004s) is a Java stack only and

  • My recent project it is not opening

    while opening the dialogue box this project saved in a newer version of Adobe Premiere Pro and cannot be opened in this version

  • Itunes freezes when adding media to Iphone

    I have just updated to Itunes 10.2.2.14 on Windows XP, I also have never synced my Iphone 3g to itunes, but when attempting to add any media to the iphone, the progress bar stops halfway on the first song, the arrows remain spinning but nothing happe