To launch Internet Explorer on button click.

Hello friends
I want to open Internet Explorer with a html file on button click. The html file will contain some report data in html format which I want to show to the user on button click.
Please help me in doing this.

Maybe you're looking for a faster solution than Joni's thread. I just made this for an Info Screen, maybe it helps:
// lunch the Browser and view the HTML file
public void openBrowserWith (String aHtmlLocation) {
     try {
          Runtime.getRuntime().exec(getExplorerPath() + " " + aHtmlLocation);
     catch (Exception e) {}
// this method should return the program path of your own browser; it needn't be as hard-coded as I did:
public String getExplorerPath() {
     return "c:\\program files\\plus!\\Microsoft Internet\\iexplore.exe"
// I think you know how to add a JButton and a ActionListener to your application; thus, we only need to implement the actionPerformed method:
public void actionPerformed(ActionEvent e) {
     String command = e.getActionCommand();
     if ("OK".equals(command))
          openBrowserWith(getHtmlLocation());
public String getHtmlLocation {
     return "http://" or "file://" and "the path where your HTML file is";
}

Similar Messages

  • Launch Internet Explorer using button click

    Hello friends
    I want that on click of a button Internet Explorer opens with an html file. Actually the file which opens is a report which I want to show to the user.
    Please help me in doing this.

    you could try doing something like this in your button click handler
    String command = "c:\\program files\\Internet Explorer\\iexplore.exe c:\yourfile.html"
    Runtime rt = Runtime.getRunTime();
    rt.exec(command);

  • Launching Internet Explorer

    I am trying to launch internet explorer from a java program using -
    Runtime.getRuntime().exec("c:\path for IE.exe")
    This works OK if I enter the correct path in the above statement as a string literal.
    However the program generates a html file that I wish to view with IE.
    So in my program code I have something like -
    String fileName = file.getName()
    Runtime.getRuntime().exec(fileName)
    Unfortuneately IE will not launch with this code - does anyone know why ?
    Regards
    Scott

    replace filename with ---> cmd.exe /c start iexplore
    filename <---in the runtime method call....I have tried this but no joy. I am unsure how to format the command in the runtime method call and this is probably why its not working.
    Do I need to do something like ("cmd.exe /c start iexplore" + fileName)

  • Trouble launching Internet Explorer

    For the last week I haven't been able to launch Internet Explorer. I can get on the internet through Safari, so the problem is not with my internet connection. I've tried trashing the program and re-installing with no success.

    I don't know why I wandered onto this forum, I posted on the Tiger forum Geeting on line and Networking.
    Andrew Bishop, "Internet Explorer not working", 03:35pm Nov 4, 2005 CDT
    and see
    http://www.tuaw.com/2005/10/31/a-microsoft-catch-22/
    It's microsoft up to its tricks. Either disconnect the computer from the Internet and reset the home page from preferences in IE or do as suggested in the links.

  • Internet Explorer allows double click on submit

    Im having a problem with my update and insert pages while using WindowsXP IE 7.
    The insert page will allow you to do multiple clicks on the insert/submit button. The insert button will not go grey after clicking on it. You can continue to click and you can hear the click click sound. After the double click(s), my Validate Form SB will tell me I have a duplicate User Name in the database. When I check, the insert has taken place. It does the first insert and then goes back to make the insert for the second click or the third or the fourth click.
    On my update page, I have a send e-mail SB. When you do a double click on this page, the page will send multiple e-mails. Itll send as many e-mail as you click.
    None of this happens in Safari or FireFox.
    I tried Disable Submit behavior but will not fix it: http://www.dmxzone.com/ShowDetail.asp?NewsId=7615
    I tried Submit Once and it didnt work either:
    http://www.kaosweaver.com/extensions/details.php?id=75&cid=3
    Is there a fix for Internet Explorer?
    Do I have to do some sort of JavaScript code just for IE (whats the code), seems like this should be part of the Toolbox.

    I have Microsoft Outlook also with Firefox and can open just about every link, url, company page, etc via the email links. First, make sure you have noted the email as NOT JUNK so that the links are activated by Outlook. Second, Firefox needs to your default browser for the links to open in Firefox rather than IE. There are some links from Microsoft that may ignore the default and open in IE but not all anymore. I have a Sony laptop which ignores the default browser and opens all of its support information from its VAIO software loaded on the computer in IE. Besides that though, over 95% of my items will open in my default brwser selection, which is currently Firefox.
    Go to this link to make sure Firefox is your default browser.
    http://support.mozilla.com/en-US/kb/How+to+make+Firefox+the+default+browser?s=Make+Firefox+the+default+browser+&as=s
    Or this link to make any browswer of your choice the default.
    http://www.chami.com/tips/internet/043099I.html
    Hope this helps.

  • History problem in jsp page,internet explorer back button

    hi everyone
    i have a jsp page suppose a.jsp.in which i am using dropdown menu to displays:list of data from database,one submit button i am using name select and click here.after selecting the value from dropdown menu ,again some other data will be displayed from some other table in same a.jsp page.
    my problem is:
    when user selects one value from drop down menu ,it is diplaying the value in same page .upto here is ok
    and i click back button from I.E only one page back it is showing
    but when user select the value form drop down menu 2nd time ,and after data get dipalyed in same apge a.jsp.then
    whne i click back button ,now it is showing two a.jsp page .history is not going .
    this is the problem.i dont want to this morw than one page get displayed in back button.only one page a.jsp
    if anyone has understood my problem ,please help.
    thanku

    thanks java2006
    but it is not working .i will try to explain once again
    1. one page called a.jsp.this page contains one drop drown menu list box ,and one submit button.
    2.data in drop dropdown is coming from db.as the user select value from drop down box .relalted value is diplayed on same a.jsp page.
    3.again user select the 2ndvalue from drop down box ,related value is displayed.
    this i explained about my a.jsp page.
    problem is
    4.when user select the 1st value and clcik on submit button related value is displaying.upto here its ok.and in back button of Internet explorer it is showing only one a.jsp page
    5.but whenever i am trying to see 2nd or 3rd or more value from drop down after related value is being diplayed in same a.jsp page.
    the back button of internet exlorer showing two a.jsp page after clcicking submit button
    .as u have told the code aso but it is not working
    i have added ur code indisde html tags .

  • Launch Internet Explorer

    Hi,
    I have to launch MS Internet Explorer from my java application. I am using the following code:
    try{
         Runtime rt = Runtime.getRuntime();
         rt.exec("iexplore.exe www.yahoo.com");
    }catch(IOException ioe){
         System.out.println(ioe);
    }But its generating an exception as below:
    java.io.IOException: Cannot run program "iexplore.exe": CreateProcess error=2, The system cannot find the file specified.
    If I give the absolute path then it executes successfully.Like
    try{
         Runtime rt = Runtime.getRuntime();
         rt.exec("C:\\Program Files\\Internet Explorer\\iexplore.exe www.yahoo.com");
    }catch(IOException ioe){
         System.out.println(ioe);
    }Now the problem is that I can't give the absolute path because window may be installed on drive "D:\\". What I wanted is to get the "Program Files" path and then launch "IEXPLORE.EXE".
    Any solution.
    Thanks in anticipation.
    Regards,
    Ahmad Jalil Qarshi

    Try with
        String[] commands = {"cmd", "/c", "start", "iexplore.exe","-nohome", "www.yahoo.com"};
        Runtime.getRuntime().exec(commands);If using jdk1.6 then the Desktop class is the preferred way to start the default browser.
    See http://java.sun.com/javase/6/docs/api/java/awt/Desktop.html
    try {
       Desktop.browse(new URL("http://www.yahoo.com");
    catch (MalformedURLException e1) {
       e1.printStackTrace();
    catch (DesktopException e2) {
       e2.printStackTrace();
    http://www.rgagnon.com/javadetails/java-0579.html
    Bye.

  • Internet Explorer starts when clicking on Firefox.exe

    Whether through the desktop shortcut (which points correctly to firefox.exe in the right folder) or through the exe itself, Internet Explorer starts instead of Firefox.
    Asking for a default browser from IE did nothing, as did changing the default setting for the OS (Windows 7). Re-installing to the latest version of Firefox did not work. IE was current. "firefox.exe" does start up in Task Manager and can be shut down that way.
    There are no error messages and no new add-ons were installed in Firefox before this happened.
    Haven't heard of anything like this before.
    == This happened ==
    Every time Firefox opened
    == Cannot recall any settings changing.

    He did add the Broadsoft toolbar. We disabled it in IE (couldn't uninstall it) and uninstalled the Outlook add-on then restarted. This didn't take care of the problem.
    My problem seems different than any of the ones posted. As Firefox does NOT start a browser window at all; instead IE starts a browser window.
    The toolbar was designed for IE and was not installed on Firefox. Also, my boss said the problem was there before this toolbar was installed.

  • Launching Internet explorer after install finishes

    I find that after installing from IE8 the installer launches the browser again using the same Administrator privileges that the installer requested with UAC. I'm not sure this is in the best interest of the user.

    I think this is primarily to demonstrate that Flash installed correctly, or didn't as the case may be. If you're logged on as Adminstrator, then that modus operandi will prevail.
    You could try logging in with a user a/c with less priviliges and then right click the installation file and choose "Run As Administrator", but I can't guarantee it'll work.

  • Internet Explorer CLOSE Button for OBPM 10GR3 Presentations

    Hi all,
    I am using OBPM 10GR3 presentations with a POPUP window.
    I already have a close button to close the presentation. This is a Global Interactive Activity which displays the dashboards.
    The Global Interactive Activity contains a screenflow and inside the screenflow I have a Interactive Component Call to call the presentation.
    Now the presentation opens smoothly and everything is displayed.. When we hit the CLOSE button everything goes away and when we open it again it again comes back to the previous Interactive Component Call and restarts.
    BUT
    When we Close the window itself instead of using the CLOSE button of the presentations, and we re-open, we get the previous data.
    This is because we do not hit the CLOSE button of the presentation instead hit the IE WINDOW CLOSE button on the top right hand corner besides the minimize maximize button.
    Therefore the call is still inside the screenflow inside the Global Interactive Activity and therefore it waits for the user to hit the CLOSE button of the presentations otherwise does not close.
    How can we resolve this issue?
    How can we make sure, that if the user closes the IE WINDOW itself using the CLOSE button, it closes the presentation itself and when re-opened displays the previous presentation?

    Hi,
    First of all this is a training issue with the user. It is not advisable not to press the close button of the IE.
    Nevertheles you can disable to close button of the presentaion.
    You can remove the x from dialogs by doing this. Open the executionDialog.xhtml file in the <OraBPMEnterpriseHomeDirectory>\webapps\workspace\jsf\common directory (both Studio and Enterprise have this file).
    Change the text on line 81 from this:
    <oc:Dialog verticalAlign="top" offsetY="40" backColor="#D4E1EB" borderColor="#517B9E"
    borderStyle="solid" borderWidth="1px" id="executionDialog#{componentBean.id}"
    title="#{fn:getMsg('EXECUTION')}" broadcastName="executionDialog#{componentBean.id}"
    maximized="#{componentBean.executionDialogMaximized}" width="#{componentBean.executionDialogWidth}"
    height="#{componentBean.executionDialogHeight}" titleBarCssClass="bpmWorkspaceDialogHeader"
    displayMaximizeButton="true"
    modal="false" jsObjectName="executionDialog#{componentBean.id}">
    to this:
    <oc:Dialog verticalAlign="top" offsetY="0" backColor="#FFFFFF" borderColor="#FFFFFF"
    borderStyle="solid" borderWidth="1px" id="executionDialog#{componentBean.id}"
    title="#{fn:getMsg('EXECUTION')}" broadcastName="executionDialog#{componentBean.id}"
    maximized="#{componentBean.executionDialogMaximized}" width="#{componentBean.executionDialogWidth}"
    height="#{componentBean.executionDialogHeight}" titleBarCssClass="bpmWorkspaceDialogHeader"
    displayMaximizeButton="true"
    displayCloseButton="false" modal="false" jsObjectName="executionDialog#{componentBean.id}">
    This change does a couple things. The addition of the text "displayCloseButton="false"" removes the x button that is causing the undesired results you're getting and setting the colors to #FFFFFF changes the light blue border around dialog boxes to white.
    Bibhu

  • Launch Internet Explorer from PDF instead default browser chrome

    Hi
    I want to launch IE Browser from PDF links rather than any default browser like chrome etc.
    Is there a specific way that PDF links can be create for above requirement?
    Thanks

    Not possible. URLs are delegated to the OS which does with them what it's
    set up to do.
    The link itself (and Acrobat/Reader in general) has no way of interfering
    with that.
    On Thu, Dec 11, 2014 at 7:51 AM, sigirisetti <[email protected]>

  • Internet Explorer Close Button

    I have written an application and within that app I have popup pages. On my popup pages, I have a close button that clears the cache on that page and closes the window. I am having issues now because users are using the IE close button instead of the close button in my app. Therefore, my clear cache and other processes attached to my close button are not running. Any ideas? Thanks!

    Hey J Lee, did you ever find a workaround to this problem? I'm doing something similar and the cached values were appearing. I called my popup window using the &SESSION. substitution originally. When I removed this parameter, the page loads slower but uses the values I wanted.
    Hopefully this helps someone. Although, I just took another look at the last post date and it's 2006. Oh well, I've typed it now.
    Kieran
    Message was edited by:
    Kieran

  • Is it possible to create a context menu, which is launched by right mouse button click event?

    The question is following: when you are pushing right button in the window of a working vi you see the build-in context menu of labview. Is it possible to customize it, or create the new one?
    www.xinstruments.com
    Custom Software for Industrial Automation
    www.hdrconverter.com
    Picture processing made easy

    There's no nuilt-in LabVIEW function or tool to do it, but Dave Ritter published an artical in the LabVIEW Technical Resource last year that described how to do this. It uses the Event Structure so you need to have at least LabVIEW 6.1.
    You can read a bit of the artical here. There's also a link on the bottom of the page where you can purchase that issue to get the entire artical and sample code.
    Ed
    Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
    Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.

  • Enable button in File Toolbar when launching in Internet Explorer

    I have an installation of Acrobat Reader 8 installed using an MST file on several Citrix Servers. Also a hidemenu.js file is configured to show /hide some specific items.
    When I open a PDF file all the items are showed/ hide as configured in the hidemenu.js file. So far so good
    When launching Internet Explorer and open a pdf file in the browser some buttons are missing. We need the E-mail button from the File Toolbar by default. This button is there when I open the application outside Internet Explorer. The user can enable the E-mail option using the File Toolbar, but this setting is reset when the user has logged of.
    Can somebody please explain how to enable this option (or any other option from the File Toolbar) when open a pdf file in Internet Explorer by default?

    Hi,
    In the screen which shows you the dump, you will have a button debugger. Click on that and find out the field that is passed to 'obj'. It should be of character type and it is passed as Packed Integer in your report. Change the data type to 'C' and check it.
    Regards,
    Sharmila

  • Internet Explorer immediately launches when try to open the desktop from the Start screen

    When I log onto my computer, instead of the Start screen opening, the Desktop opens, AND when the Desktop opens, Internet Explorer immediately launches there. 
    Other times, when I log-on, my computer will open on the Start screen, but then immediately launches Internet Explorer on the Start screen.  I didn't click any Internet Explorer icons."
    Also, when I am doing something on the Start screen and decide I want to go to the Desktop and I click the "Desktop tile" it switches me to the Desktop and launches Internet Explorer.  Again, I didn't click the Internet Explorer tile.
    (I just wanted to go to the blank Desktop.)
    There is something telling my computer to always open Internet Explorer first.  When I tried a warm boot, the problem went away momentarily, but returned after a few days"

    Hi,
    What is your current situation?
    Have you checked the suggestions by Robert?
    When opening PC the start menu will automatically start Internet Explorer in APP mode, and if we set Internet Explorer to open in desktop mode, then it will automatically open under desktop when start?
    As we have no Internet Explorer in startup configured, so it won't start by itself. We may try to replace Internet Explorer item's position on the start menu with a different APP, then check what happens(drag and drop the desktop icon on the place of the
    Internet Explorer);
    Is the MSN webpage your home page here? If not, then there might be some application on the startup automatically launches this page, we may take a try to disable one at a time to check; and if this is your default home page, try to replace it with another
    one, then change it back.
    From the last response of
    this thread , it seems this is more related with the webpage than the browser?
    Best regards
    Michael Shao
    TechNet Community Support

Maybe you are looking for