Opening a client file - Mail attachments for example

Building a swing client mail application has one huge hickup and can't think of a good solution. How do you automatically open an email attachment?? If its a .doc document, it should open a word document automatically instead of reinventing the wheel and code some Java RTF viewer.
A lot of attachments are compressed, you mean you have to code it all in Java? That would be absurd? With 100 now common mime types, anyone have any good suggestions of doing this.
For example - Would the windows "start" command be a good idea to simply open the folder if not a text/html or image (gif/jpg) file?
What about linux and unix and mac?? Whats the OS command to open the mail cache attachments folder? Not happy that Java doesn't support a native method to open a file. Why is that?
Hope people reply to this and bring some ideas that are effective and would not be too troublesome to implement or re-invent the wheel??
Thanks
Abraham Khalil

If you peruse cross-platform browsers and mail clients (like Mozilla), you'll see that most provide in their editable configurations a mapping of mime-types to applications. Using this, a user can specify what command to give to the hosting platform to execute when a mime-type is opened.
Some platforms, like windows, provide a mime-type mapping service. You can add platform specific code to take advantage of this. Mozilla allows you to, for a mime-type, specify the default application from the platform or your own.
Compressed files also have their own mime-type, so the associated application would take care of that.
I hope you find this of some help.

Similar Messages

  • How to open a zip-file in Bridge for PC?

    How to open a zip-file in Bridge for PC?

    I think it's built in, just double click on it and it should open with Archive Utility. I dunno, maybe Unrar X might work for you>
    JB

  • When I execute a download file (skype download, for example) a message appears saying internet connection isn´t available, even tough it work properly

    when I execute a download file (skype download, for example) a message appears saying internet connection isn´t available, even tough it work properly

    I'm having the same problem with this, only it happens with all add ons. I get error -228 when I try, every time.
    I can't install through the add-on manager, from the add on site, or by saving the link on the site. I've tried downloading it in Firefox, Chrome, and IE to no avail.
    I can, however, drag existing .xpi files into the add on manager and they will install just fine.
    I've looked through all the available other documentation, including the two links suggested by TXGuy above and none of it has helped.

  • Document library open in client application not working for img,pdf,txt files

    In an office 365 sharepoint site i have enabled open in client applicartion for document library but it is not working for image/txt/pdf files for word and excel files it is working fine. I have even turned on the feature open document in client application
    by default from site collection features also but there is no change.
    Please advice.
    Regards,
    Chaitanya

    Hi Chaitanya,
    The feature is currently designed to be used with HTTPS, and will not work as expected with the HTTP connection available on Office 365 for professionals and
    small businesses sites.
    To take advantage of this update, do the following steps:
    Wait for the update to the SharePoint Online service, which is in progress now.
    Upgrade Adobe Reader to the version 10.1.2 client.
    Add your SharePoint Online root URL/domain to the Trusted Sites security zone in Internet Explorer1 (e.g., 
    https://contoso.sharepoint.com).
    Check the Keep me signed in box when you log in to a SharePoint Online site.
    This
    SharePoint Online update is currently
    being rolled out worldwide along with several other new features.
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Opening a client file problem

    Building a swing client mail application has one huge hickup and can't think of a good solution. How do you automatically open an email attachment?? If its a .doc document, it should open a word document automatically instead of reinventing the wheel and code some Java RTF viewer.
    A lot of attachments are compressed, you mean you have to code it all in Java? That would be absurd? With 100 now common mime types, anyone have any good suggestions of doing this.
    For example - Would the windows "start" command be a good idea to simply open the folder if not a text/html or image (gif/jpg) file?
    What about linux and unix and mac?? Whats the OS command to open the mail cache attachments folder? Not happy that Java doesn't support a native method to open a file. Why is that?
    Hope people reply to this and bring some ideas that are effective and would not be too troublesome to implement or re-invent the wheel??
    Thanks
    Abraham Khalil

    I realize this is about a year late, but in case anyone stumbles across this in a query here's my two cents:
    I haven't researched this thoroughly enough to explain how it works, but I researched it enough to produce working code. This worked on... let me see... Windows 2000, 98, and Mac (running 1.3.1, but it should work with 1.4.2 too).
    Note this referenecs a few of my own classes...
         /** Triggers the OS to open a file with its default application.  Returns true if successful.
         public static boolean openFile(File file) {
              Process process = null;
              if(usingMac) {
                   try {
                        // from: http://www.jguru.com/faq/view.jsp?EID=430093
                        String[] cmd = {"open",file.getAbsolutePath()};
                        process = Runtime.getRuntime().exec(cmd);
                   } catch(Throwable t) {}
              } else if(usingWindows) {
                   try {
                        I found an amazing trick at:
                         http://www.michael-thomas.com/java/javacert/MyLaunchDefaultBrowser.html
                         Basically this means Windows decides how to open a program.
                        String cmd = "rundll32 url.dll,FileProtocolHandler" + " "+file.getAbsolutePath();               
                        process = Runtime.getRuntime().exec(cmd);
                   } catch(Throwable t) {}
              if(process==null) return false;
              while(true) {
                   try {
                        return (process.waitFor()==0);
                   } catch(InterruptedException e) {}
                   //don't hog the CPU while our other process is working:
                   try {
                        Thread.sleep(20);
                   } catch(InterruptedException e) {
                        Thread.yield();
         }We encountered 1 problem with the code above:
    Under really restricted settings on Mac, the code above would refuse to open a "help.html" file. So in addition to the code above, we now check the file type. if it's HTM or HTML, we trigger the browser-specific code. Of course this only helps with HTML files (or other browser-friendly files), but in this case it was enough to get by.
    Lots of useful info about java-working-with-browsers is available here:
    http://ostermiller.org/utils/Browser.html
    As a closing note: are you sure you want to automatically open attachments? That's the kind of feature viruses prey on. Not to mention trojan horses. It's a huge security risk to open a file like that; I would only consider it:
    1. If I were operating in a closed network.
    2. If I had a virus-checking program nearby, and before launching a file I could ask it to check it for me.
    Even then I'd make the user very aware of the risks involved, and would not enable it by default.
    hope this helps. Sorry nobody responded sooner.

  • I receive an Untitled page when at a website and click on a file to load , for example a pdf file.

    When at a website, I click on a file, for example a pdf file to open. A new tab comes up calling it a untitled page, file never opens. I have version 3.6.3, vista OS.
    == This happened ==
    Not sure how often
    == within last couple of months

    same with 3.6.6

  • Can't open pdf documents from mail attachments

    Have Adobe Reader free version installed. IPAD2 using latest IOS 7
    When trying to open a pdf attachment from mail attachments, there is a quick flash screen that displays and the attachment doesn't open.
    Is there a fix for this?

    Will it open other PDF attachments?  Perhaps that particular attachment is corrupt?
    A few things to try...
    1. Remove apps from the Recently Used (multi-tasking) list...
    - From any Home Screen, double tap the home button to bring up the Recents List
    - Swipe up on the app preview card to remove it from the list
    - Press the home button when done.
    2. Restart by pressing the sleep/lock button until you see the slider.  Slide to power off.  Restart by pressing the sleep/lock button until you see the Apple logo.
    3. Reset by pressing the home and sleep buttons until you see the Apple logo. Takes about 5-15 secs of button holding and you won't lose any data or settings.

  • Just installed Firefox 4. It hangs when I open any website and type in, for example, an ID, or even just click on something, for example, "Compose", in my webmail site.

    Here's the detail of what happens.
    1. Turn on computer and then click on Firefox icon on desktop.
    2. Firefox opens. Everything looks OK. Mr Bunsen's graphic is working fine.
    3. Click on any webpage link. For example, a newspaper or an online webmail page. All looks OK until
    4. Click on anything or type anything, such as in ID in a box, and bingo, the top line of Firefox goes from dark blue to very pale blue and the computer is hung. You cannot get out of Firefox or get Firefox to work.
    5. Switch off computer.
    Is this perhaps due to a clash of Add-ons. I run Avast anti-virus. McAfee came with Firefox 4 and I did not reject it. Is it conflicting wth something in my system and causing it to hang?

    You can modify the pref <b>keyword.URL</b> on the <b>about:config</b> page to use Google's "I'm Feeling Lucky" or Google's "Browse By Name".
    * Google "I'm Feeling Lucky": http://www.google.com/search?btnI=I%27m+Feeling+Lucky&ie=UTF-8&oe=UTF-8&q=
    * Google "Browse by Name": http://www.google.com/search?ie=UTF-8&sourceid=navclient&gfns=1&q=
    * http://kb.mozillazine.org/keyword.URL
    * http://kb.mozillazine.org/Location_Bar_search

  • Open URL or File not working for standalone exe

    I've tried lots of different things here...
    I have one movie, published as standalone exe (windows). In
    Preferences, I have "Open URL or File, and enter the next movie
    name - movie_2.exe.
    I have tried using a front or backslash in front of the file
    name.
    I've confirmed the files do both exist in the same directory.
    Symptom:
    They publish fine, and I can click on the exe to run it, but
    when it ends, it seems to be looking for a site...I get a browser
    window that opens, and a please wait, while it looks for
    http://movie_2.exe/, then a "Page
    cannot be displayed".
    Any hints?
    Thank you!

    I don't much use EXE output because of its limitations, but
    others do, and the situation you are describing
    is
    covered, with what appears to be a satisfactory conclusion, at this
    link. Hope this helps.

  • Open Classic AppleWorks-Files in Office for OS X

    Hi All!
    I must open a file I drew years ago on OS 9.? with Appleworks! I do not have any Appleworks version! Just Microsoft Office for OS X and that doesn´t work!
    How can I Open this file???
    Please help me urgently!!!!
    Thanks!
    Viktor

    Microsoft Office v.X and newer will open an AppleWorks word processing documents.
    <http://www.microsoft.com/mac/resources/resources.aspx?pid=resourcekits&rk=offic ex&article=/mac/officex/ork/New_Features.xml>
    Alternatively, try Panergy's icWord.
    <http://www.panergy-software.com/products/lp/we/gn_op.html>
    Dale

  • I cannot open or view e mail attachments in hot mail

    I use Hotmail on my windows XP home PC 32bit. WHen i use firefox to open hotmail any attachments sent are not visible or viewable.
    BUT
    If I use I.E 8 to open hotmail all is ok. Why ?

    ok, I found a way around the problem 4 now.
    RT. click on the image and View Image Info
    in the window that pops up click Save As
    rename file and change extension (something.jpg) save in the desired location on your computer.

  • Kmail opens microsoft excel file (xlsx) attachments with ark

    Kmail opens these file types with ark. When I right click and select open with option with "LibreOffice Calc" it works properly. I click the remember option when I doing this but it does not care of my selection and keeps opening these attachments again with ark. Is there any solution about that?

    Try changing it in Systemsettings -> File associations

  • How to open password protected files in Numbers for iPad?

    In my company, there are formats created in Excel 2010 which have password-protetected cells. Neither Numbers, nor Doccuemts to Go can't open them.
    The workaround is having someone open the file in my office and re-save it in an older version, but it messes up with the formatting and it's simply not a practical solution.
    Documents to Go still doesn't support Office 2010 password protected files. Numbers niether, so does anyone know of any app that can solve my problem?

    Go to the App Store on your iPad and download Adobe Acrobat DC (formerly called Reader).
    Open it and click on Help. Then click on Handbook. Read the section on "Open PDFs in Acrobat DC"

  • How to set up more mail folders for example "saved"?

    I have an iPad 2. Question is: How do I set up more mail folders? All there is now is " in box, sent and trash".

    This is one of the major limitations of Mail on iPad. To make things worse for POP accounts, the Inbox cannot hold more than 200 emails... I have been trying to save incoming email in the Sent mailbox, but this does not seem to work well.
    Some of the unclear details:
    https://discussions.apple.com/message/15210723#15210723
    https://discussions.apple.com/message/15241396#15241396

  • HT3775 Why can´t I open my MPG files in QuickTime for Lion??

    It tells me that it misses some codecs; but it should be an integrated function in QuickTime Player version of the Lion or??
    My MPG files has been recordet with my Sony handycam DCR-SR90.

    Luckily, there are DOZENS of video/media players and extensions avaliable for the Mac. Many of them are FREE, some of the better FREE ones are...
    PERIAN (quicktime extension)
    http://perian.org/
    QUICKTIME 7.6.6
    http://support.apple.com/kb/DL923
    VLC media player
    http://www.videolan.org/vlc/
    NICEPLAYER
    https://code.google.com/p/niceplayer/
    And if none of those work, there is a possibility that those video files may be corrupted.

Maybe you are looking for

  • Volume on ipod touch not working properly

    my ipod touch volume icon on my screen display won't go away.  i cannot adjust the volume to high or low. i already reset it to factory setting but unfortunately did not fix my problem.

  • I got locked out of my iphone

    Locked myself out of my 3gs iphone....How do you get back in?

  • Two types of queries in one report

    Hello, Does anyone know if it is possible in reports builder to query from two different systems, DB2 - jdbc and oracle - sql and then join the data based off a related field from each query. Then use this joined data to build a report? Please let me

  • Ipod service errror?

    my ipod is frozen tried to update but got ipod service error. itunes is not recognizing the ipod as being attached, but my pc makes a beep when i connect and disconnect so i know the cable and attachments are ok. cant reset, cant update, cant get itu

  • What is the status of 2.2?

    Hello. Does anyone have an idea? Why are we getting the run around? I'm a loyal customer and I would appreciate we get some answers ASAP! thanks