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)

Similar Messages

  • 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.

  • 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.

  • 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";
    }

  • 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 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.

  • 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]>

  • FireFox upgraded automatically today and since then I can't launche it...it freezes up and I have to shut it off at the computer...I can access Internet Explorer

    FireFox automatically upgraded today. When I try to launche it, it only loads about half the page. (I use Google as my home page) It just gets stuck there. I try to close out the page and I get "this program is not responding". I can launche Internet Explorer with no problem, (I much prefer using FF, but if I can't get into it...) so it has to be something with FireFox. FF freezes, so I end up having to shut of my computer AT the computer, because it won't shut off at the desktop monitor. Windows asks me to send a report and I have. I don't know if it has anything to do with it, but my Norton antivirus prevented a plugin from happening...I don't really understand it all...
    I just tried to open my home page again and got the message way up at the top of the page " Mozilla FireFox (not responding)

    See:
    * http://kb.mozillazine.org/Browser_will_not_start_up
    Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See:
    * [[Troubleshooting extensions and themes]]
    Create a new profile as a test to check if your current profile is causing the problems.<br />
    See [[Basic Troubleshooting#Make_a_new_profile|Basic Troubleshooting&#58; Make a new profile]]
    If that new profile works then you can transfer some files from the old profile to that new profile (be careful not to copy corrupted files)<br />
    See http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox

  • How do I automatically connect to my ISP when I launch Firefox like Internet Explorer does (Firefox is set as my default browser)?

    When Microsoft Internet Explorer was my browser the dial-up connection screen to my internet service provider would come up automatically when I launched the browser.
    Now that I have made Mozilla Firefox my default browser this no longer happens. Launching Firefox results in an error message which says the website cannot be found. I then have to launch Internet Explorer, connect to my ISP, close Internet Explorer, then launch Firefox.
    This is a bit tedious. Can Firefox perform the same connect to ISP action automatically just like Internet Explorer does? If so, how do I activate this?
    Thanks
    Roland Piesik

    Your above posted system details show outdated plugin(s) with known security and stability risks that you should update.
    *Shockwave Flash 10.0 r32
    Update the [[Managing the Flash plugin|Flash]] plugin to the latest version.
    *http://kb.mozillazine.org/Flash
    *http://www.adobe.com/software/flash/about/
    * http://www.mozilla.com/plugincheck/

  • 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

  • Internet explorer can't find page in windows xp sp2 using bootcamp on macbook pro

    Running windows xp with service pack 2 on my macbook pro with bootcamp.  It appears that I have a lan connection with the 1394 adapter but when I launch internet explorer it is unable to load any pages from the internet.
    Any help would be appreciated.
    Thanks.

    mariafromcement city wrote:
    I don't think so.  I have tried to access the internet from a direct wire connection from my router also without any success.
    Time to talk to Microsoft then.

  • Internet Explorer 11 for Windows 7

    Having problems with Internet Explorer 11 running on a 64 bit Windows 7 machine.
    When I launch Internet Explorer now nothing happens - just a blank screen. I then tried launching IE with no add ons and everything works OK in that mode. I have tried disabling all add ons but still launching IE will not work.
    Any ideas ?

    Have you disabled "Download Controls" in Manage add-ons?
    Meanwhile, click Internet Options\Security\Custom level, then scroll down to ActiveX control and plug-ins, disable all precvious used ActiveX Control. then test again
    Yolanda Zhu
    TechNet Community Support

  • Enabling Flash Player in Internet Explorer

    If you’re having problems viewing Flash content on the Web using Internet Explorer 9 or higher, even though you’re sure Flash Player is installed, it may be because the Flash Player Add-on has been disabled (turned off) in your browser settings.
    To enable Flash Player, please follow the steps outlined below:
    Please click here for an HTML5 version of this video: YouTube HTML5 HD Link
    Launch Internet Explorer and navigate to http://helpx.adobe.com/flash-player/kb/find-version-flash-player.html
    If you see an animation playing, then Flash Player is enabled.
    If you don’t see an animation playing, then Flash Player is not enabled. In that case, click on the Tools icon in the top right corner of Internet Explorer. (The icon looks like a cogwheel.)
    In the drop-down menu which appears, click Manage Add-Ons.
    In the dialog which appears, select Toolbars and Extensions.
    In the list of Add-ons, look for “Shockwave Flash Object” – which is another name for Flash Player.
    In the Status column, check to see whether Shockwave Flash Object is Disabled. If it is, click the row for Shockwave Flash Object to highlight it.
    In the bottom right corner of the Manage Add-ons dialog, click the Enable button.
    Close the Manage Add-ons dialog.
    Click Refresh to reload the webpage. If you see the animation playing this time, then Flash Player has been successfully enabled.
    If you continue to encounter problems viewing Flash content after completing these steps, please see our FAQ on ActiveX filtering.
    ActiveX Filtering in Internet Explorer

    Me too. Thanks a million, Chris. Without you, I would go crazy pulling my hair off.
    I tried everything I possible could, you name it, I did it, but I was kept advised to download
    and install the latest flash version. The next step I would try to uninstall IE9 and re-install IE8,
    because I did not have such an issue when I was using IE8. If this fails, I would even try to
    buy a new computer. Finally, I came across this forum and find your answer.
    I follow your instructions, and finally I DID IT. I can see all videos now.
    Many many thanks to you Chris. You save me a lot of work and money.

  • COM Surrogate stops working When printing in Internet Explorer 10

    Some info about the setup
    Virtual Server
    WIndows server 2008 R2 Standard
    Terminal server
    64 Bit
    Internet Explorer 10.0.9200.16618
    Problem detail from Reliability Monitor
    i.imgur.com/fN1yFxA
    The problem only occurs for some users, other users on the terminal server are able to print.
    Printing in Google Crome works just fine.
    I've tried to disable all "add-ons" in internet explorer
    I've disabled Data Execution Protection for "C:\Windows\SysWOW64\dllhost.exe"
    I've also tried to add "C:\Windows\System32\dllhost.exe" got an error about 64bit 

    FOUND A WORKING SOLUTION TO INTERNET EXPLORER 11's COM Surrogate Error
    Problem: My Windows 7 x86 (32bit) Virtual Instance on Parallels was having issues with launching Internet Explorer 11, either after an upgrade from 10 or when I had accidentally uninstalled then reinstalled my Parallels Display Adapter from the Device Manager.
    And since one of my work websites rely and are only compatible with Internet Explorer, this was driving me NUTS. Every time I would launch Internet Explorer, I would get bombarded with a series of COM Surrogate errors that would never stop until I had end
    tasked everything via Task Manager and/or restarted the virtual machine.
    Diagnosis: After attempting all the available solutions on the internet..: Updating Windows 7/8 Codecs, Adding Data Execution Prevention (DEP) entries for both COM Surrogate and Windows Host Process for my x86 Windows 7, and attempting to find a way to downgrade
    Internet Explorer 11 (nearly impossible).
    HERE IS THE SOLUTION that worked for me:
    1. Hit Windows + R (Run) and launch "inetcpl.cpl" (Internet Explorer Settings)
    2. Go to the Advanced Tab, and Click "Reset..."
    3. Check "Delete Personal Settings" and click Reset
    Enjoy :)
    --Will.

Maybe you are looking for

  • Can some one help me with this problem with my frame???

    i have gt a veri strange problem with my program,that is teh graphic changes only when i resize the the frame,if i dun resize,it will remain the same.However what i intended is that when i click on the radio button,it will change immediately to the r

  • NFS Sender File Adapter Source Directory

    Hello everybody, I have the next problem cause company politics I can't put some files that I need in the XI Server, so I sould take them from another server directory, and cause compañy politics too I can't use FTP so I need to use NFS, but I've bee

  • What happened to the multi-touch gestures in Finder?

    I've updated to Lion last week.  Overall, I think what Apple did was great to the overall experience.  However, my only gripes are in Finder.  What happened to the multi-touch gestures?  The only thing that I can do is flip through files in cover vie

  • Extend Airport Express with Time Capsule? So just one Wi-Fi network in my house ? Possible?

    Hi! I did Google and try to get it working at home - but I can't get it to work. I want to be able to walk in my house without my iPhone/iPad loosing the Wi-Fi signal because now there is downstairs and a upstairs wi-fi network. So the thing I want i

  • Why can't I set a default calendar on my iPad?

    On my iPhone, I can set a default calendar under the "Mail..." utility option, but this is NOT an option on my iPad. Is this just an oversight on Apple's part or am I overlooking the setting elsewhere on my iPad?