Launching external viewer per file type

From my Java program I need to launch external viewers per file type. Is there any easy way to do this?
My program may generate various output files (eg. html, txt, pdf ...etc). Once a file is generated, I want to launch corresponding registered viewer on users desktop so user can view the output(eg. for "HTML" registered web browser OR for TXT launch Notepad OR for PDF launch Acrobat etc).
I suspect that this functionality may become OS-dependent but maybe somebody knows a "pure java" way of doing this?
Even if I could do it for Windows only that'd be get me by for the moment. If somebody knows a Window's specific solution even that would help.
TIA.

Actually after some more searching I stumbled upon this at javaworld.
On Windows one can execute url.dll that interpretes the given file (or URL) argument and launches appropriate viewer.
For example to launch HTML viewer you execute the following command using runtime..
rundll32 url.dll,FileProtocolHandler http://www.javaworld.comTo launch notepad you use the following command.
rundll32 url.dll,FileProtocolHandler C:\myfile.txtThought it might be useful for anybody else reading this thread...

Similar Messages

  • External Editor - New File Type

    Is there a way that you can set an external editor and specify a specific file type that is not listed in the 'File Type' section of preferences.
    I am working on a project for a client where I have been coerced into developing PL/SQL code. I'd like to house the code in XCode so that I can take advantage of the SCM integration and the new Snapshot feature in 3.0 as well as keep the files tied together in a project.
    I have SubEthaEdit setup to manage .sql documents within finder. So I can choose 'Open with Finder' from the context menu in the Groups & Files pane and the document will open in SubEthaEdit. However, I'd like to associate those files directly with that editor in XCode so it will open the files with that editor by default. Ideally I'd like to have a text.script.sql file type that I can use for this purpose.
    Any thoughts or feedback would be greatly appreciated.

    Rob,
    I am not sure if this will help you, but you can look at the textmate editor (http://macromates.com/) in case it can do some of the things you want
    Mihalis.

  • Plugins for viewing other file types?

    Hi. I'm just wondering if anyone knows of a plugin for Bridge that would allow me to preview other file types, specifically Blender 3D .blend files.
    Windows Explorer can preview them, but not Bridge. And Bridge can preview all of the AI and PSD files that Windows Explorer can't.
    I'd like to use bridge since it is faster for previewing and changing meta data, etc.
    Any help is appreciated.
    Thanks!

    I'd like to use bridge since it is faster for previewing and changing meta data, etc
    If the files don't show in the content window they probably are not supported. First try a purge cache for folder using the tool menu / cache/ purge cache for folder and if still no luck check the file type associations in the Bridge preferences.
    If your file is not on the list the only option is to add a feature request somewhere on this forum. The more people want it the bigger chance it will get realized sometime.
    I'm not aware of any plug in to add file types to Bridge. Don't think scripts can solve this but you could also visit the scripting forum for this.

  • External editors and file types

    Hi,
    I have just started using Aperture, so far very pleased but have some questions so thought I would ask the experts.
    1. I have selected Elements 10 as an external editor, when I select to edit aperture creates a PSD file and starts Element 10 but does not open the file to be edited. I then have problems finding the file on my iMac.
    2. Once I have found the file and edited it, if I save the file it places a modified PSD file back in the original folder but the PSD file is massive is there any other way to edit and keep in JPG format
    3. The reason to edit in Elements is so I can crop to specific print sizes and ensure the image is 300 dpi. I can see in Aperture how to crop to a size but I need the result to be at 300dpi as the printer company I use will re-crop to give 300 dpi.
    Thanking you in advance for any help you can give me and apologise for being a little greedy with three questions

    For PSE try
    http://barbarabrundage.com/2011/10/05/adobe-hide-and-seek-setting-pse-10-as-exte rnal-editor/
    Point the Editor to "Applications>Adobe Photoshop Elements 11>Support Files>Adobe Photoshop Elements Editor"
    2. Once I have found the file and edited it, if I save the file it places a modified PSD file back in the original folder but the PSD file is massive is there any other way to edit and keep in JPG format
    Sorry, no. When you use an external Editor, you can only use tiff or PSD as format. Aperture will use the best lossless format. If you want jpeg, export the edited version as jpeg and reimport it.
    3. The reason to edit in Elements is so I can crop to specific print sizes and ensure the image is 300 dpi. I can see in Aperture how to crop to a size but I need the result to be at 300dpi as the printer company I use will re-crop to give 300 dpi.
    You can specify the 300dpi in the export preset, when you are exporting from Aperture, if the printer company insist.
    In the Export Panel set the the selector for the preset to "Edit" and then select 300 dpi in the panel.
    Regards
    Léonie

  • When I open a PDF, I want to choose from 3 applications, not just 2 plus other. How can I change the number of recent applications that get listed for opening a file type?

    I'd like firefox to remember the 3 most recently used applications per file type, not just the most recent 2.

    On my Windows 7, with any browser, all downloaded files go into the Downloads folder.
    If you can't find your downloaded PDF docs, try a search for *.pdf

  • Display file type, bit rate, sample rate in 12.0.1?

    I just upgraded to 12.0.1 running on an old dual quad core running OS10.7.5
    I used to be able to customize the ID3 tag fields when displaying my music library.
    One important aspect was to view the file type, bit rate, and sample rate as I'm a band/audio producer.
    I can now only view those things when I "get info" on each song.  This is really painful as I'd like to see a list of all my songs and be able to easily see those 3 fields and sort by them.
    Is there a way or did Apple remove this ability therefore making my experience of using iTunes be pretty much ruined?
    any help would be much appreciated!  thanks...
    .k.

    One important aspect was to view the file type, bit rate, and sample rate as I'm a band/audio producer.
    I can now only view those things when I "get info" on each song.  This is really painful as I'd like to see a list of all my songs and be able to easily see those 3 fields and sort by them.
    Is there a way or did Apple remove this ability therefore making my experience of using iTunes be pretty much ruined?
    Symbion,
    The ability is still there, but it is enabled differently.
    In Songs view, click the drop-down at the upper right  Then click the next drop-down called "Show Columns," as shown below.  There, you can pick the columns you want to display, including sample rate, etc.

  • Problem with file types.  Please help

    I recently downloaded the entire Sun Java Tutorial and have started to go through it. At the end of the first main trail about inro to OO Programming, there is a question/answer portion. There are a couple of excercies where you are to go through the ClickMe app and change some things around. When you click the 'click me' hyperlink, it would open the source in a new Internet Explorer window. That didn't work well for me as I can't very well edit anything in an Explorer window. So, I decided to change and do an 'open with' and used NotePad. Well, it didn't open it in a very readable format... so I thought 'forget it' I want to get it back to the IE format where I can at least read it easily. So, I've started to dig around and now I can no longer do an 'open with' and if you go into the View, Options, File Types 'JAVA' isn't listed anywhere in there.... BUT if I try to add a new type it says'java_auto_file' is associated with another program. So, then I got into REGEDIT and tried to modify the 'java_auto_file' key to use InterNet Explorer... but now I can't get the thing to even open in IE. HELP? If anyone can do this and see what I'm talking about can you figure out how to get me back to how it was when I pulled off the Tutorial....I'm lost. Thanks

    Try Netscape -- it lets you see the source files .java when you click on the link.
    Messing with Window's Registry is risky business. Try to find the old working copy and restore/rename it.

  • Launch external files from a presentation

    preparing a long presentation with many external files (of many kinds: swf, quicktime, html, etc) as examples.
    I am trying NOT to stop the keynote, go thru the finder launching different files in front of the audience.
    I would much prefer if i can use a button inside my presentation to launch that specific file.
    Any ideas? 3rd party plug ins? automator script?

    Keynote has no scripting capabilities what so ever :/.
    Obviously some of the file types you describe can be placed into the Keynote presentation itself. QT, Insert Menu> Webview for web page inside presentation; with textbox selected... Insert menu >Text Hyperlink > Webpage to change to browser and link to url. Email message?! Not files as such though.
    I'm sure you could write an applescript to run in parallel to the presentation to handle all the file launching in a sequence for you or even with a list of buttons if you wanted to get really serious with UI builder.
    Flash support was dropped as a consequence of changes to QT. Flash support inside QT was discontinued (security?).

  • Launch External Files from SSRS

    I have a report that will list the names of files that are attached to this report in the database.  I would like to include the list of files from the database and allow the users to click or double click the file name and have the file load. 
    Is there a way for SSRS to do this?  The files can be in multiple formats, and in the project that adds the files we can use:
    System.Diagnostics.Process.Start(filepath)
    And it will launch the correct process to view the files.  I have stored the the file itself in an image column, and I also have the full path and the file name in columns as well so I could create a dataset to retrieve the file names and show them
    on the report.
    Anyone have any suggestions?
    Thanks.

    Hi katghoti,
    If I understand correctly, you want to embed external files (word, pdf, image etc.) into a report in Reporting Services. If in this scenario, I suggest that you can use the following two methods to achieve your requirement:
    Embed these files into database.
        1) Use the SQL commands to embed these files in database as the image data.
        2) Use the .net language (C#, VB) to convert this data into the image.
        3) Use the image control to show these images, which are files embedded in database.
    Reference:
    How to embed a pdf document in Reporting Services
    Upload these files in the report server, access them using URL.
        1) We can upload these files in the report manager.
        2) Adding hyperlinks to reports to link to these files stored on the report server.
    Reference:
    URL Access Parameter Reference in Reporting Services
    How to add a Hyperlink to a URL in Reporting Services
    Hope this helps.
    Thanks,
    Katherine Xiong
    If you have any feedback on our support, please click
    here.
    Katherine Xiong
    TechNet Community Support

  • How do I change the desktop Icon for an external hard drive?  I have gone to "Get Info" and tried dragging and dropping  several formats of pictures and the icon changes to the generic image of that file type.

    how can I change the desktop icon for an external hard drive.  Using LaCies and Dimple hard drives.

    One of the things I've found with OS X (at least with Snow Leopard, which is my first excursion into OS X), is that all too often the thumbnail displayed on a file, whether a file created or one downloaded, is a false thumbnail. That is, when you do a Get Info on the file the icon in the upper left is the generic icon for that file type, rather than the thumbnail displayed in Finder. Makes it a bit difficult to copy.
    Apparently Finder uses Preview in the background to generate the displayed thumbnail without actually creating one.
    What I've resorted to doing, particularly with graphic images, is to process them with GraphicConverter - I have its prefs set to automatially add thumbnails and previews. With an individual file this means opening it in GC and doing a Save As. However, a much easier and faster way is when there are two or more such files; I put them in a common folder and drop the folder onto GC. GC then opens them in a catalog view, in the process adding real thumbnails and previews to each automatically. Doesn't take long to do several hundred files that way.

  • I have tried to view videos created in premiere elements 10 and I get the following message: "this file type is not supported, or the required codec is  not installed.  When it opens there is a red screen in the monitor panel with Korean writing which als

    I have tried to view videos created in premiere elements 10 and I get the following message: "this file type is not supported, or the required codec is  not installed.  When it opens there is a red screen in the monitor panel with Korean writing which also appears in the place of each clip in the video.  I tried uninstalling and reinstalling premiere elements 10, but that did not have any effect on the video.  Do you have any suggestions?  I researched codec, but do not understand them at all.

    gloucester
    In case you did not find it, the following is a copy/paste of the Announcement on Premiere Elements 19/NVIDIA GeForce
    that appears at the top of this forum.
    Premiere Elements 10 NVIDIA Video Card Driver Roll Back
    If you are a Premiere Elements 10 user whose Windows computer uses a NVIDIA GeForce video card and you are experiencing
    Premiere Elements 10 display and/or unexplained program behavior, then your first line of troubleshooting needs to be rolling
    back the video card driver version instead of assuring that it is up to date.
    Since October 2013 to the present, there have been a growing number of reports about display and unexplained workflow
    glitches specific to the Premiere Elements 10 user whose Windows computer has a NVIDIA GeForce video card. If this applies
    to you, then the “user to user” remedy is to roll back the NVIDIA GeForce video card driver as far as is necessary to get rid of
    the problems. The typical driver roll back has gone back as far as March – July 2013 in order to get a working Premiere
    Elements 10. Neither NVIDIA nor Adobe has taken any corrective action in this regard to date, and none is expected moving forward.
    Since October 2013, the following thread has tried to keep up with the Premiere Elements 10 NVIDIA reports
    http://forums.adobe.com/thread/1317675
    Older NVIDIA GeForce drivers can be found
    http://www.nvidia.com/Download/Find.aspx?lang=en-us
    A February 2014 overview of the situation as well as how to use the older NVIDIA GeForce drivers for the driver roll back can be found
    http://atr935.blogspot.com/2014/02/pe10-nvidia-video-card-roll-back.html
    ATR

  • How to create a button in a interactive document and use the button to launch and external "exe." file.

    I created an interactive document and will export as a swf.  I would like to create a button in the interactive document to launch and external "exe." file. Is this possible.

    You will need to create custom web part editor. Look at the following example. It also have added button and its events. I am sure you can use this sample as base and code your logic.
    http://msdn.microsoft.com/en-us/library/hh228018(v=office.14).aspx
    Amit

  • How do I view downloaded content when the error message, not a supported file type or because the file has been damaged, shows up?

    I trying to download a book as a pdf to view through my adobe reader. But every time I do I keep getting the same error message saying that the file is not a supported file type or because the file has been damaged it can't be opened or viewed. What do I do and how do I get it to work. Because as of now I only have one option of downloading the book and I've tried to download the app notable pdf to see it that worked but it didn't either. As of right now I'm using google chrome but I also tried using Safari but it's still not working. I have a Mac with a Mac OS X updated system. I need an answer ASAP. Can anyone help me?

    I have the same issue.  Almost none of the PDFs I download from Safari browser can be opened. Same message about the file being damaged or not really a true PDF.  Neither of these are the issue here. Size of file is not an issue. I have Acrobat Reader XI so I believe that's pretty up to date.  If I open with Text Editor the file is blank.  any ideas?

  • I have Windows 7 for PC if I view a jpg file I gat the following message - Some of the file types associated with QuickTime applications are currently associated with otherapplications. Should I restore these file type associations to Quicktime. Yes or No

    After viewing a jpg file on my Windows 7 PC I get the following message and I don't know how to answer it "Some of thw file types associated with QuickTime applications are currently associated with other applications. Should I restore these file type associations to QuickTime?" Options are " Yes, No or Do not ask to perform yhis check again. QuickTime Control Panel can be used to make subsequent changes."
    What shoul I do about this message?

    Select no.

  • Hello, I can see the Icon of my external hard on the mac os x 10.6.8 but I can not open it or view any file in the external hard

    hello, I can see the Icon of my external hard on the mac os x 10.6.8 but I can not open it or view any file in the external hard
    your prompt reply will be appreciated
    thanks

    Reinstall 10.6 again, but this time hold c boot off the 10.6 and erase the ENTIRE internal drive.
    You do this by selecting the drive makers name and size on the left hand side, not the slightly indented partition underneath it.
    If you erase and install 10.6 only into a parittion, say Macintosh HD, the you still have the hidden Lion Recovery Partition on the drive and it appears you already have 10.7
    In the MAS, hold option and click Purchases to redownload Lion
    FYI, you don't need to install 10.6 to reinstall 10.7, 10.7 can be reinstalled via the Lion Recovery, Command r boot.
    See this for more info
    https://discussions.apple.com/docs/DOC-3046

Maybe you are looking for

  • How can I convert video in a WMA format to play in QuickTime Pro?

    I have installed my QuickTime Pro, but cannot play any of my videos that I already have stored on my computer. They are all in the WMA format. Is there anyway I can convert these files to play in Quicktime Pro? I also cannot figure out how to downloa

  • Apple disabled Apple ID when moved to new one, can not delete old from iPad

    Followed apple process to move Apple Id to a new email on my Macbook Pro.. Now can't login with original apple ID to turn off find my iPad. Appears Apple disabled it, since I know the password. Attempted to also login on Macbook Pro using the (old)pr

  • Wrong colors when printing to HP Colorlaser Jet 4550 PCL 5c

    I just upgraded from Labview 5.1.1 to Labview 6.1 on a Windows 95 Compaq Notebook. All the plot colors in 8 plot XY Graph indicator printed correctly on our network HP Colorlaser Jet 4550 PCL 5c using Labview 5.1.1. When I print the graph in Labview

  • ITunes Error - HELP!!!

    I keep getting this message when trying to import music to my i pod from my computer. The ipod cannot be synced. The disk could not be read from or written to.

  • Problem with pictures not showing up

    I just updated my iphone 3g to the 4.0.1 and i went into my pictures n half of them show up black in the album. but u can still click on them and seee them full screen. Is there anyway to fix the problem with the pictures showing up as black in the a