Open HTML-file (in explorer) from application

we want to display a help-file from an application. The help-file is an HTML-file. How can we display this file in for example Explorer?

Hi, try:try {
      Runtime.getRuntime().exec(new String[]{"PathforIE/IEXPLORE.EXE", //path,
               "PathForHTML/YourHTML.htm"});     
} catch (Exception ex) {
      ex.printStackTrace();          
}     HTH
Phil

Similar Messages

  • Opening a file in its native application from Flex.

    Is it possible to open a file on whatever native application the user runs it as?  Or even, at that, to simply open the directory it's in, in an explorer window?
    We have a search application and the frontend is in Flex, and I'm trying to find a way to do this, such that when a use double clicks on a result (in a datagrid - but that's trivial), it opens the file or at least the location of the file on the OS.
    Any system call where I can say system("explorer.exe " + filepath); or something?
    Any help would be appreciated.

    Dear BillBlalock ,
    thank you for answer!! You are very kind and helpful!! I would like to inform everybody that I have finally find another way of soilving my problem and I announce it to the forum in case somebody else encounters the same problem. Well, I soved the nproblem by using the following code:
        excelButton.addActionListener(new ActionListener()
           public void actionPerformed(ActionEvent e)
             String filePath = "\""+saveFileName.toString()+"\"";
             System.out.println(""+filePath);
             try
               String cmd="explorer "+filePath;
               Process p = Runtime.getRuntime().exec(cmd);
             }catch(IOException ec){}
         });I hope it can be useful to somebody!! By this code, I can make a button (in my case the excelButton) to open any file in its default application. Keep up the great work you are doing guys!!

  • Open html file from Applet

    Hi,
    I need to open html file from applet, the html file is placed in my local system, it is not open. the code is below, please can u tell where i did wrong.
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.net.*;
    <applet code="Resource.class" width="400" height="400"></applet>
    public class Resource extends Applet implements ActionListener
    Button b = null;
    public void init(){
    b= new Button("Click");
    add(b);
    b.addActionListener(this);
    public void actionPerformed(ActionEvent ae){
    try
    URL adress = new URL(getDocumentBase(), "html_code.htm");
    getAppletContext().showDocument(adress, "_blank");
    System.out.println("Execut inside"+adress);
    }catch(MalformedURLException e){
    System.out.println("Eror in Display");
    }

    Don't cross post
    http://forum.java.sun.com/thread.jspa?threadID=633500

  • How Can i open Html file in a Browser from Jar file

    Hi
    i am having Html help files inside my Jar file ... if i use
    getclass().getRource("\lib\start.html");
    it is not opening ... so i have to ship seperate folders for html files along with jar files.... can anyone give the solution to have(open) html files inside the jar file and to open then in a default browser of any OS
    Regards
    Ganesan S

    the follwing method i have used to open html file ...
    so to access html file i am shipping resources folder with jar file ..
    private void openHtmlPages(String pageName) {
         String cmd[] = new String[2];
         String browser = null;
         File file = null;
         if(System.getProperty("os.name").indexOf("Linux")>-1) {
              file = new File("/usr/bin/mozilla");
              if(!file.exists() ) {
              }else     {
                   browser = "mozilla";
         }else {
              browser = "<path of iexplore>";
         cmd[0] = browser;
         File files = new File("");
         String metaData = "/resources/Help/Files/"+pageName+".html"; // folder inside jar file
         java.net.URL url = this.getClass().getResource(metaData);
         String fileName = url.getFile();
         fileName = fileName.replaceAll("file:/","");
         fileName = fileName.replaceAll("%2520"," ");
         fileName = fileName.replaceAll("%20"," ");
         fileName = fileName.replaceAll("jarfilename.jar!"," ").trim();
         cmd[1] = fileName;     
         try{
              Process p = Runtime.getRuntime().exec(cmd);
         }catch(java.io.IOException io){
                   //Ignore
    can anyone give me the solution..???
    Regards
    Ganesan S

  • IWeb won't open .html file

    Greetings,
    I recently upgraded from a G5 running Tiger to an Intel iMac with Leopard. I have several basic web pages that I used to edit using the ancient Classic app, Claris Home Page.
    Now that I can no longer run Classic apps, I thought I'd give iWeb a try. I right-clicked an html file and selected Open With. In the dialog box, iWeb was greyed out, so I switched from Recommended Applications to All Applications. Then, when I selected iWeb, the app gave an error message saying it could not open a .html file.
    Umm, isn't that the point of the app, or is this thing designed to create some sort of proprietary file format specific for use with MobileMe?
    BTW, after this, I was unable to launch iWeb directly from the Finder because it would always try to open that same file again, resulting in the same error. I had to trash the prefs files and empty the trash before I could open iWeb again and get to that opening template page.
    Help? thanks
    Dennis

    When you create a site in iWeb it saves it in its own special format in a file called 'Domain' in ~/Library/Application Support/iWeb. When you publish, to MobileMe, to a local folder, or to another server, it creates the html, css and other files on the fly and uploads them to the server. When you want to edit, you open iWeb, it reads the Domain file, and you edit as necessary and re-upload. If you want to edit the site on another computer, you have to copy the Domain file to that computer and open it in iWeb. You cannot re-import the published html files and edit them in iWeb, nor edit html files made in another application.
    To do that you could use Kompozer (free).

  • Open Html file

    How i can write a program can open html file?

    Well I dunno what he meant but I'd like to know how
    to open a html file on my hard-drive from a java
    application.Just like you open any other file on your hard drive.

  • Can't import/open HTML files in Fireworks CS4

    I'm trying to import/open HTML files into Fireworks CS4 to do some redesigning. I inherited the job of redoing my companies website and we believe the person who created our website created the site using Dreamweaver 8. Unfortunatley that person moved on to a new job across the country and we can't ask him exactly how he created our website.
    When I try to open some of the HTML files in FW I get the message: "Could not open the file....Fireworks could not find an HTML table in this file". Next I tried creating a new, very simple HTML page in Dreamweaver CS4 that contains just a few lines of text and 1graphic (we just bought the CS4 web suite). Again, I get the same error.
    Other files give me a slightly different error message when trying to open them in FW, "The HTML document contains one or more images with absolute web addresses for the source. Fireworks cannot handle these images. --click OK-- (next error message) Could not open the file. Fireworks has encountered a problem with the HTML in this table. Verify that the HTML is valid"... and then it closes and nothing loads into FW. Bummer.
    I've searched on these forums and can't find any solutions to this problem although I found a few people experiencing the same problem.
    Do I need to do something to the Dreamweaver created HTML's to get them to open in FW? Any help would be appreciated.

    Fireworks is a graphics editor that can export code; it is not an HTML/code editor.
    If you have exported HTML from Fireworks, you ought to be able to re-import that, but I would think most people who use Fireworks exported code would just modify their Fireworks document and re-export. (Fireworks' code is not robust and it is only intended for mockups and prototypes. Fireworks is not intended for developing and maintaining live Web sites; Dreamweaver is.)
    If your developer used Dreamweaver, then I really don't expect that Fireworks would be able to import that, nor any code that isn't in exactly the format that it can export. If you know your developer used Fireworks, then you need to look for .png files. Fireworks uses an enhanced version of the PNG format for its native document format.
    If you are making small adjustments to your site, then you might be better off working in Dreamweaver. If you're doing a site re-design, then Fireworks is an excellent tool for laying out your design and producing your graphics, but you will, at some point, need to move over to Dreamweaver for coding.

  • Help - "Acrobat is being used by another application and cannot open PDF files until the other application is closed."

    Hello,
    I searched this site and google for this error terminology and come up dry.  I support a user who has been for years using Acrobat 5 (yes, I know...) to read files in a client DB program, as well as other PDF files on their PC.  In the last week or so, they have started gatting this error "Acrobat is being used by another application and cannot open PDF files until the other application is closed." any time they attempt to open a PDF file attached to an email (via Outlook).
    It is my understanding that they cannot upgrade to a newer version of Acrobat because of limitations of their client software, but had not previously had any issues viewing PDF notes from the DB, and PDF attachments in their email.
    I have tried uninstalling and re-installing, as well as tried using Adobe Reader 7 & 9 in conjunction with Acrobat to try to get around this issue, but have not been successful.
    Any ideas?
    Thanks,
    Jesse

    I don't have an answer to your technical problem. The product I assume is Acrobat that you are talking about (based on the post title), Adobe is the company name. This is a good place to ask questions on Acrobat if folks can figure out what you are talking about. They will ask for the product version number (like AA9.3.3), operating system, and other applications if appropriate. Also, just what you are doing that generates the message.
    As for Adobe, you are not likely to get an answer from them here in the user forum. You will be lucky if you can get an answer if you can contact them and not be on hold for more than an hour (sorry, this is why a lot of folks end up in the forum).
    So, to help others try to answer your question, what are the products and versions involved? What OS? What are you doing when the message comes up.

  • How to upload a file in bdc  from application server

    how to upload a file in bdc  from application server

    Hi
    Check if this is useful and reward.
    PERFORM UNIX_UPLOAD.
    FORM unix_upload.
      DATA : lv_string(600) TYPE c.
      lv_string = p_fname. "p_fname is the filename  in path
    OPEN DATASET lv_string FOR INPUT IN TEXT MODE ENCODING DEFAULT.
      IF sy-subrc <> 0.
        MESSAGE 'File Not Found' TYPE 'I'.
        LEAVE PROGRAM.
      ENDIF.
      DO .
        READ DATASET lv_string INTO gs_gfile.
        IF sy-subrc NE 0 .
          EXIT.
        ENDIF.
        APPEND gs_gfile TO gt_gfile .
        CLEAR  gs_gfile .
      ENDDO.
      CLOSE DATASET lv_string.
      CLEAR lv_string.
      DATA: lc_split TYPE c VALUE cl_abap_char_utilities=>horizontal_tab.
      LOOP AT gt_gfile INTO gs_gfile .
        SPLIT gs_gfile AT lc_split INTO
                                       gs_ipfile-field1                           
                                       gs_ipfile-field2.
      ENDLOOP.
    ENDFORM.                    "unix_upload
    here gs_ipfile is the same structure as your input file to upload
    and
    gs_gfile is the work area of the internal table containing characters as :
    TYPES  : BEGIN OF  ygs_gfile    ,
              data(600)             ,
             END OF    ygs_gfile    .
    *Internal table declaration for input file as text
    gt_gfile   TYPE STANDARD TABLE OF ygs_gfile  INITIAL SIZE 0 ,
    *Work area declaration for input file
           gs_gfile   TYPE ygs_gfile                                   .
    Thanks and Regards
    A Swarna

  • No option to save files, content/file type missing from Applications list

    I want to be able to click a link to a file and have the option to Open the file with a specified application.
    When clicking on the file I want to Open with a specified application, I only get a Save or Cancel option.
    When I look in Preferences > Applications, the file type is missing from the list.
    This was working. It is not working anymore. It is not a problem with the website. I need to know where in the FF settings I can change this.
    FF 30.0
    Kubuntu 13.10
    Thanks

    ''Tahl [[#answer-693773|said]]''
    <blockquote>
    OP, did you ever get a solution to this problem? It's driving me nuts having to specify a download destination then go into a program to open the file I just downloaded!! Have tried deleting file types .rdf and no success either!
    </blockquote>
    I'm not sure of the solution on Windows. But this worked for me on Linux.
    I needed to edit mimeTypes.rdf
    See the links below for details. The first one was someone having a problem with Transmission. I was having a problem with ktorrent, so I just adapted that. If you're having a problem with a different file type, then you'll need to adapt it differently. But the general idea is the same.
    http://askubuntu.com/questions/384375/how-can-i-get-firefox-to-open-torrent-files-with-transmission
    http://forums.mozillazine.org/viewtopic.php?f=9&t=1706945
    Also, I suspect that FlashGot or some similar download manger plugin was responsible for screwing this up. I haven't confirmed it yet, but I've seen some things that make me suspect it.

  • FileNotFoundException thrown when opening a file for writing from EJB

    Hi,
    I know it is against EJB rules that access file IO from EJB. However we have a legacy system to working with and we need to generate a text file on file system.
    Weblogic (we are using 10.3) allows open a file for read from EJB. When we tried to open a writer like below:
    BufferedWriter writer = new BufferedWriter( new FileWriter(fileName, false));
    FileNotFoundException was thrown from the native method of open. The fileName is an absolute path and permission is properly set. The same piece of code can execute correctly in a test application with same filename.
    Does anyone know how to achieve this or whether Weblogic just forbids this kind of output access?

    Sorry guys. Just double-checked the source code and found out a bug produced wrong filename, the filename was surrounded by "", so FileNotFoundException is a correct result.
    Weblogic does allow read/write external file.

  • HT2041 I receive an error message when opening up a downloaded program as "Safari can't open the file because no availabel application can open it". Not sure what exactly this means or what I have to do!

    I receive an error message when opening up a downloaded program "safari can't open the file because no available application can open it" I am not sure what I need to do to get these programs open!

    What is the file?
    Where did you get it from?
    Allan

  • Won't open after trying to open HTML file

    Hi, I had an .html file and by mistake I tried to open it with iWeb. Now, when I try to open iWeb I get an error message:
    *Can’t open file “~/Desktop/websites/TRC/book40off.html.”* OK BUTTON
    When you click the OK, then nothing happens. It doesn't open at all. I restarted my imac i5 27" (10.6.4) and it's doing the same thing. I really need to open iWeb, so what should I do???
    I never had a problem like this where you TRY to open a file and then the application goes nuts.

    ###### UPDATE ######
    I took the CD that came with my iMac "iMac Applications Install DVD" and installed the iWeb package over. It did the install, restarted the computer and when I look in the Application folder I can see the date on iWeb is TODAY. But, when I click to open it I get the SAME error message!!!! How can that be when I installed it over again?

  • Safari 7.0.5 unable to open html file

    I used to be able to open HTML files in Safari so I can read the content but now it won't let me. Safari 7.0.5. Is there an issue with this version? I am also unable to see some content in our SalesForce app for work. Would a different version of Safari fix this?

    You may have installed "SearchMe" or some other malicious Safari extension.
    From the Safari menu bar, select
              Safari ▹ Preferences... ▹ Extensions
    Remove all extensions with the word "Spigot" in the description. If in doubt, remove all extensions. Do the equivalent in the Chrome and Firefox browsers, if you use either of those.

  • How to open m4a file in GarageBand from iTunes music?

    How do I open m4a file in GarageBand from iTunes music (first recorded on iPhone Voice Recorder). I am recording my foreign language teacher and want to be able to replay at slower pace than she speaks.

    ArtDog11 wrote:
    How do I open m4a file in GarageBand from iTunes music
    http://www.bulletsandbones.com/GB/GBFAQ.html#importfromitunes
    (Let the page FULLY load. The link to your answer is at the top of your screen)
    ArtDog11 wrote:
    want to be able to replay at slower pace than she speaks.
    http://www.bulletsandbones.com/GB/GBFAQ.html#changeimportedtempo
    (Let the page FULLY load. The link to your answer is at the top of your screen)

Maybe you are looking for

  • REFRESH BUTTON OF ALV GRID

    Hi Experts,       In ALV report i have to apply custom functionality when user clicks on 'REFRESH' button.Please suggest me how to catch this event.I have used the event 'AFTER_REFRESH' OF CLASS CL_GUI_ALV_GRID.But it is not the right event.Please su

  • Multiple routers on one computer

    I need a little help if someone can help me.  Currently I have my Linksys WRT54GS wireless hooked up to share the internet with 2 computers.  My problem is that I also have Vonage that uses a VoIP router and a D-link router for my Sorensen video phon

  • Incredibly slow rendering in Media Encoder CS4 for Mac

    We're having a strange problem trying to render a Premiere Pro CS4 project in Adobe Media Encoder . We're doing a 720p H.264 file that is about 35 minutes long. On my macbook pro laptop it took about 24 hours to render. As an aside, the same sequence

  • Airplay Mirroring iPhone 4s?

    I am just looking for clairification. In see people saying the iPhone 4s will be able to do mirroring through Airplay but it seems like in all the documents on Apple.com only talk about the iPad2. So to clarify, is the iPhone 4s going to be able to b

  • Firefox won't let me upload files to nearly any Web site, so how can I fix this issue?

    Whether it is gmail, Facebook, or more specifically this site (http://www.carnivalentertainment.com/index.htm), Firefox won't let me upload any type of file. Of course, if the Web site offers a standard uploader then I have a better chance of having