Invoking web browser within an application

Hi, folks. i just wrote a testing program for this purpose. Here is the error message i got when running the program.java.io.IOException: CreateProcess: start iexplore http://www.yahoo.com error=2. someone plz help me work it out. thanx in advance.
import java.io.*;
public class test
     public static void main(String[] args)
          try
            Runtime.getRuntime().exec("start iexplore http://www.yahoo.com");
         catch(IOException e)
               System.out.println(e.toString());
               System.exit(1);
}

public static void main(String[] args) {
    try {
        // leave out the 'start' and make sure it's in your
        // path or specify the path explicitly. This code
        // works on my XP box.
        Runtime.getRuntime().exec("c:/progra~1/intern~1/iexplore http://www.yahoo.com");
    } catch (IOException e) {
        System.out.println(e.toString());
        System.exit(1);
}

Similar Messages

  • How to connect other mobile web browser to java application.

    I'm trying to write an application in j2me and wondering how can i take the requested url from the default web browser of mobile phone to my java application and download page using java application and send the downloaded data to that browser.
    I don't know any API that do this.
    Please help...

    take a look at [Java ME Content Handler API (CHAPI), JSR 211|http://java.sun.com/products/chapi/]
    - CHAPI +"...manages the action to handle [Uniform Resource Identifiers|http://en.wikipedia.org/wiki/Uniform_Resource_Identifier|Wikipedia article] (URI) based on a MIME-type or scheme. CHAPI provides the capabilities for browsers and native applications as well as Java ME applications to invoke other Java ME applications which dynamically extend the media types and capabilities supported by the device's application environment...."+

  • How to invoke a browser from an Application button  with a specified URL

    Hi
    I am trying to invoke a browser by clicking a button on my Application .I want the browser to come up with the URL I decide before i click on the button.
    To invoke the browser i am using the Runtime class. and then using the Runtime.exec() method .
    But thats only half the solution.(Loading a specific URL decided at runtime is a problem)
    Is there a way out ??
    Thanks
    Pranav

    Hi there,
    You have already reach to solution, just specify parameter as your URL to iexplore.exe in Runtime.exec() command.
    Like if you running from command prompt , it will look like something below
    C:>directory where iexplore is>iexplore java.sun.com
    for java Runtime.exec("iexplore.exe","java.sun.com");
    hope it will help you out,
    Dhwanit Shah

  • How to work with Back Button of Web Browser for Flex Application

    Hi...........
    I am developing a Web Site for that I have created 10 MXML Components for 10 links I am using ViewStack in Home Page and I added the 10 components to this ViewStack and I am using 10 links for 10 Components
    My problem is that When I am going through links it's fine but in my Web Browser I am not getting Back Button enabled for previous page to go
    Please help me.............................. 

    Hi,
    Here a Flex3 example:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
         layout="absolute"
         creationComplete="initApp()">
         <mx:Script>
              <![CDATA[
                   import mx.events.BrowserChangeEvent;
                   import mx.managers.IBrowserManager;
                   import mx.managers.BrowserManager;
                   import mx.utils.URLUtil;
                   public var browserManager:IBrowserManager;
                   private function initApp():void {
                        browserManager = BrowserManager.getInstance();
                        browserManager.addEventListener(BrowserChangeEvent.BROWSER_URL_CHANGE, parseURL);
                        browserManager.init("", "Shipping");
                   private var parsing:Boolean = false;
                   private function parseURL(event:Event):void {
                        parsing = true;
                        var o:Object = URLUtil.stringToObject(browserManager.fragment);
                        if (o.view == undefined)
                             o.view = 0;
                        tn.selectedIndex = o.view;
                        browserManager.setTitle((tn.selectedIndex == 0) ? "Shipping" : "Receiving");
                        tn.validateNow();
                        var details:Boolean = o.details == true;
                        if (tn.selectedIndex == 0)
                             shipDetails.selected = details;
                        else
                             recvDetails.selected = details;
                        parsing = false;       
                   private function updateURL():void {
                        if (!parsing)
                             callLater(actuallyUpdateURL);
                   private function actuallyUpdateURL():void {
                        var o:Object = {};
                        var t:String = "";
                        if (tn.selectedIndex == 1) {
                             t = "Receiving";
                             o.view = tn.selectedIndex;
                             if (recvDetails.selected)
                                  o.details = true;
                        } else {
                             t = "Shipping";
                             o.view = tn.selectedIndex;
                             if (shipDetails.selected)
                                  o.details = true;
                        var s:String = URLUtil.objectToString(o);
                        browserManager.setFragment(s);
                        browserManager.setTitle(t);
              ]]>
         </mx:Script>
         <mx:TabNavigator id="tn" change="updateURL()" width="300">
              <mx:Panel label="Shipping">
                   <mx:CheckBox id="shipDetails" label="Show Details" change="updateURL()" />
              </mx:Panel>
              <mx:Panel label="Receiving">
                   <mx:CheckBox id="recvDetails" label="Show Details" change="updateURL()" />
              </mx:Panel>
         </mx:TabNavigator>
    </mx:Application>

  • Open web browser from java application to specific page

    Hi,
    I used the code from http://www.javaworld.com/javaworld/javatips/jw-javatip66.html to open a web browser to a specific URL. That worked great! However, I run into a problem if the URL targets a specific page, for example, "http://www.yahoo.com/news.html" would give me an problem with the shortcut problem. Any ideas how to get around that?
    The command rundll32 url.dll,FileProtocolHandler http://www.yahoo.com/news/ would work fine, except anything ends with .htm or .html.
    Thanks,
    David

    It looks like url.dll doesnt like .htm or .html files. For more info look here: http://www.jsiinc.com/SUBI/tip4100/rh4162.htm
    For some reason it is confused by the 'm' character in .html which is odd considering it has no problems with .com
    So if you want to keep using url.dll, do something like this:
    replace ".htm" with ".ht%6D"

  • Invoking a browser via java application

    I just downloaded code (to launch a browser) at:
    http://www.javaworld.com/javatips/jw-javatip66_p.html
    It brings up IE ONLY if it's not running already. But when it does launch IE, it does not resolve the website URL. It only produces a blank page...no errors, just blank...
    Any ideas on that one?
    BTW, make sure you add :
    import java.io.*;
    otherwise, the "catch" statement will not compile.
    Thanks,
    Bob

    It is absolutely normal that it only launches IE, because it actually launches Windows Explorer with a URL as parameter, and the Explorer hands it over to IE.
    Otherwise the program should have to guess what is your default browser and its path, which probably can't be done without reading the registry, something java can't do.
    All the program does is to launch a command :
    rundll32 url.dll, FileProtocolHandler <url here>
    type this command through Start menu -> Run dialog box and see if it opens the url. If it doesn't, then the problem is in your system. It opens the url on my comp.

  • Display PDF in Web Browser Setting

    Good Morning,
    We recently encountered some issues with Adobe 9.0.0 on Citrix servers. We updated to Version 9.3.4, since we had not fully tested Reader X yet.
    The issue is that we have an application that calls to Adobe and opens PDF files within the application.  When I log on to the citrix server locally, the setting Display in PDF Browser is selected.  My account is an admin of our domain. When I log in to the server with a standard account, the setting is not selected.
    I found the bBrowsing Integration key in HKCU\Software\Adobe\Acrobate Reader\9.0\Originals and when I am logged in with admin account it is set to 1, when I login with the non-admin account it is set to 0.
    The same key also appears in HKEY_Users\.Default\Software\Adobe\Acrobat Reader\9.0\Originals.  My question is this, can I set this globally on my Citrix servers so that the Display PDF is Browser is selected. when users login to Citrix Presentation Server, launch the applications that call to Adobe, that the pdf open in a web browsers of the applications. Currently, if you hit the link the PDF file will open in its own window.
    Sorry if this is a bit wordy, but I figure it is best to give too much info as opposed to not enough.
    Thank You
    Brian Dougherty

    Yes the pdf is opening in adobe. But I don't want to open a new adobe browser to open.
    I want to display in the current web browser where my application is running.
    eg. if u are embedding pdf file like this.
    <EMBED src="temp1.pdf" width ="750" height="550"></EMBED>
    It won't open the new window. It displays the result in the current window.
    I have my pdf content in byte array. To wirte the above code i need a file. I even writes the byte array to a temporary pdf file. But I can't able to import that file dynamically to the WSAD workspace.
    Is there any other way to embed the (byte array)pdf file in the current window.
    Please advice me.
    Thanks in advance.

  • Show web page within abap web dynpro

    Hi,
    I am looking for a way to show a web page (like www.google.com for instance) inside an abap web dynpro application.
    Any suggestions would be very welcome.
    Regards,
    Bert

    I dont think you can open a Web Browser within a Browser.
    But you can call the URL in a new window using the following code;
    data lo_window_manager type ref to if_wd_window_manager.
    data lo_api_component  type ref to if_wd_component.
    data lo_window         type ref to if_wd_window.lo_api_component  = wd_comp_controller->wd_get_api( ).
    lo_window_manager = lo_api_component->get_window_manager( ).
    CALL METHOD lo_window_manager->CREATE_EXTERNAL_WINDOW
      EXPORTING
        URL            = 'http://www.google.co.in/'
        MODAL          = ABAP_FALSE
        HAS_MENUBAR    = ABAP_TRUE
        IS_RESIZABLE   = ABAP_TRUE
        HAS_SCROLLBARS = ABAP_TRUE
        HAS_STATUSBAR  = ABAP_TRUE
        HAS_TOOLBAR    = ABAP_TRUE
        HAS_LOCATION   = ABAP_TRUE
      RECEIVING
        WINDOW         = lo_window.lo_window->open( ).

  • Signing a pdf in web browser

    I am setting up a web application where a person can open a PDF in their browser and sign a signature field in a PDF form.  Once they sign it they can click a submit button in the PDF form and it submits the form data via HTTP (not FDF or XFDF).
    They can sign it, but when the form is submitted back to the web server the signature data is not part of the form data.
    Is there any way to get the signature data in the form data that the PDF is sending?
    Thanks!

    Yes the pdf is opening in adobe. But I don't want to open a new adobe browser to open.
    I want to display in the current web browser where my application is running.
    eg. if u are embedding pdf file like this.
    <EMBED src="temp1.pdf" width ="750" height="550"></EMBED>
    It won't open the new window. It displays the result in the current window.
    I have my pdf content in byte array. To wirte the above code i need a file. I even writes the byte array to a temporary pdf file. But I can't able to import that file dynamically to the WSAD workspace.
    Is there any other way to embed the (byte array)pdf file in the current window.
    Please advice me.
    Thanks in advance.

  • Pdf in web browser

    Hi
    can anybody tell me how to display a pdf file in a current web browser where my code is running.
    my pdf file is in byte array format.
    i already tried <embd>
    Thanks in Advance.

    Yes the pdf is opening in adobe. But I don't want to open a new adobe browser to open.
    I want to display in the current web browser where my application is running.
    eg. if u are embedding pdf file like this.
    <EMBED src="temp1.pdf" width ="750" height="550"></EMBED>
    It won't open the new window. It displays the result in the current window.
    I have my pdf content in byte array. To wirte the above code i need a file. I even writes the byte array to a temporary pdf file. But I can't able to import that file dynamically to the WSAD workspace.
    Is there any other way to embed the (byte array)pdf file in the current window.
    Please advice me.
    Thanks in advance.

  • Nokia 5500 Web browser - HELP PLZ!

    Hi ,
    I'm in india and using Nokia 5500 Black model since a month.
    I was very happy using it untill a day back the web browser in 'My Own' section suddenly stopped working. When i click the icon, NOTHING happens, no error message and absolutely nothing.
    I called up nokia customer care and they told me to reset my phone settings. i did so, and then to my surprose, not only web browser but ALL applications in 'My Own' folder stopped working with same behavior.
    Cam please someone help me out as to what i can do to make my phone work as it was before.
    Waiting for a useful reply,
    Thanks,
    Santosh

    Hey thanks for the reply, i did that, but no use.
    Now when i did it, even the web icon is disappeared.
    Is the web browser application available somewhere on net.
    Any other way to help!
    -Santosh.

  • Support for Blackberry Browser to access applications?

    Has anyone heard whether Oracle will begin to support Blackberry Browsers (i.e. 3G) for their web browser to access applications like I-expense or i-procurement?

    Hi,
    Please refer to the following documents.
    Note: 458549.1 - Will iProcurement Work On A Blackberry?
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=458549.1
    Note: 556634.1 - Is OAM Supported For Blackberry Devices?
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=556634.1
    Regards,
    Hussein

  • Is it possible to run a java application within a web browser?

    Hello everyone here! I have a question about running a java application within a web browser and I would appreciate it very much if anyone here can give me some answers.
    I have a standalone java application written with AWT. Basically this free application lets users to select spectral lines from a big file based on some criteria and plot those selected lines. Yes, it is a very simple application. Now I want to run this application within a web browser so that users don't need to download the application from the ftp site and thus don't need to install in their machine. Is it possible to run this application within browser? If yes, can we get the same plotting function as we run the application separately and where should I start out?
    Thanks in advance!
    kuilian

    Please see the signed applet discussion group for details of how to avoid the applet security restrictions. You can sign the applet, or use the policy file containing {AllPermission} for testing purposes (though not suitable for widespread deployment).
    Regards
    Matthew

  • Requires a microsoft sharepoint foundation-compatible application and web browser

    SharePoint 2010 version 14.0.7102.5000.
    Clients are Windows 7 SP1, Browser is IE 10.0.9200.17296
    Problem is the well known famous message 'requires a microsoft sharepoint foundation-compatible application and web browser' when the user chooses the button New Document.
    Why this behaviour for this user is different then all the threads and blogs I read about this message is because of the  following: I am logged on using my Windows account on my computer (VDI so I have the same computer as the user experiencing the
    message) and don't have this problem. When the concerning user uses my logged on computer under my account and only logs in with his credentials within SharePoint (sign in as Different User) then the problem occures. I performed the same actions on the same
    library as the concerning user.
    So ruled out are:
    - Browser version
    - Office version
    - windows User Profile
    - x86 vs x64
    - MS Foundation Support installation
    - add on SharePoint OpenDocuments Class
    Please help me out.

    Do you have different versions of Office or SharePoint Designer or any Office product installed? 
    You can try repairing office installation in that particular user machine and see what happens.
    Thanks.
    Sorry to say but software versions can be ruled out as I mentioned the user have the same problem when using
    my logged on account in Windows on my computer. Only in the browser the user is logging in with his credentials. I don't have this problem when using this Document Library.

  • Running a Java application from web browser

    Hi,
    I'm not sure if this is the right place to put this, and it probably isn't, but I don't really know what else to do at the moment.
    I have a problem. I've written all these nice and pretty Java applications that do all this complicated junk that makes me proud. However...I have no idea how to actually run those applications.
    I've looked at guides on Java applets, Java Web Start, Java Server Pages, etc, and I still am not sure. JSP looked like the best option, until I figured out I can't use it with my web server. So, I've pretty much hit a wall here.
    If anyone could shed some light on this, I would be very appreciative. All I want is for a certain application to run when a user clicks a button on a simple HTML page. That's all I want...yet it seems so hard.
    Is there a simple way to do this, or do I need to use JWS or something and configure all these JARs and JNLP and classpaths and everything under the sun (no pun intended)?
    Again, I apologize if there is a better forum for this; I am just very confused right now and feel like I've hit a brick wall. If anyone can give me any advice, or point me in a good (easy) direction, I would truly be grateful.

    If anyone could shed some light on this, I would be
    very appreciative. All I want is for a certain
    application to run when a user clicks a button on a
    simple HTML page. That's all I want...yet it seems so
    hard. There's a lot of hidden details that make it so hard. What computer will run the application when the button is clicked? If the application will run on the client computer (within the web browser) there has to be a mechanism for allowing arbitrary code to be downloaded, verified and executed on any number of different target platforms. This is the problem that Java Applets address. Mostly this is a security issue, since a simple HTML page being able to run arbitary code without user interaction or approval is going to cause the world to be overrun by computer virii. There's also the multi-platform issue, but in many cases that can be avoided by requiring the client to use a single platform (the MS approach).
    If the application will run on the server, then the client code is much less difficult, as only a basic web browser is needed, and the server code is complicated, since it needs to keep track of multiple clients at the same time and process data in a request-response fashion.
    From the end-user's point-of-view, it certainly is simple though. Press the button and voila!
    "Any technology which is distinguishable from magic is insufficiently advanced"
    Brian

Maybe you are looking for

  • IPod delivery times?

    I ordered a new iPod Touch, since my 4th Generation Touch is completely broken. This is the first time I've ordered an item from the Apple Store. I coughed up an extra 10 bucks to get the 2-3 day shipping--I got my name engraved into it, so that sets

  • BW Retail content

    Hello gurus Could anyone please send me any documents regarding the BW retail implentation.. i hve the PDF but i need some more if any available. Also could anyone send me the link for 2LIS_40_REVAL from saphelp. regards Ram

  • Switchport module within 1800 VPN router

    Hi Folks, I have a Cisco 1801 VPN router (using PPPoA) which I currently have one PC attached to the Fe0 port which in turn picks up a DHCP address from the local pool within the router. I am now planning to add a few more PC?s to the site and I was

  • Need to download 10.5 on my mac osx version 10.4.11

    need to download 10.5 on my mac osx version 10.4.11

  • Running desktop OS VMs in corporate Hyper-V?

    Hello All, The company I work for currently has a number of server-OS virtual machines running on Hyper-V. We also have a number of server-OS virtual machines in VMWare on ESX. We are now facing a situation where other teams in our area have virtual