Opening a URL from an application

Hi everyone, am not quiet skilled with java but i would really appreciate your help with this, as i couldn't find a solution which made me doubt my whole basic knowledge of java. Now am doing this for my school project, it's a speech recognition application that will convert speech to text, there are 2 buttons in my interface, one "start" where you start speaking , the other one "stop" which would allow the engine to start processing the speech and converts it to text, it will then open a web page which in my case is a search engine(say google or yahoo) and searches for the matching documents of what has been spoken.
my problem is that i need to open that certain URL ( predefined) from a running application and not an applet, it hasn't worked for me, This is the only problem. is it possible ? please i need your help with this , i'd really appreciate it if someone would help ... thanks a lot for your time.

hii guys am really sorry for the confusion ,the problem was actually with the java security poilcy not with the code as i thought.. i thought my code was wrong but it turned out to be correct.. here it is for anyone who's interested... but thanks anyway for everything... tc
Runtime rt = Runtime.getRuntime();
rt.exec("C:/Program Files/Internet Explorer/iexplore.exe http://www.google.com/search?hl=en&q=hi+my+name+is+omaya");

Similar Messages

  • Want to open a URL from java application?

    I want to open a URL (say http://yahoo.com) from my java application without using servlets. PLzzz help asap

    Include these packages:
    import java.net.*;
    import java.io.*;
    Proxy Setting If any:
    //getProxy your proxy address default "No Proxy".
    if (!getProxy.equals("No Proxy"))
    System.getProperties().put("proxySet","true");
    System.getProperties().put("proxyHost",getProxy);
    System.getProperties().put("proxyPort","80");
    Main code:
    URL url = new URL("http://mail.yahoo.com");
    URLConnection connection1 = url.openConnection();
    String filetext=postURL(connection1);
    Function postURL:
    public String postURL(URLConnection connection)
    try
    BufferedReader httpResponse = new BufferedReader(new InputStreamReader(connection.getInputStream()));
    String line = new String();
    StringBuffer buffer = new StringBuffer();
    while((line=httpResponse.readLine())!=null)
    buffer.append(line);
    httpResponse.close();
    return buffer.toString();
    catch(Exception e)
    System.out.println("Error:"+e);
    return "Error4" ;

  • Open new url in java application

    Hi,now i met a problem,i want to open a url in a application in any platform.It can descrips like this:In a java application ,there is a button ,when i clicked the button ,i can open the web browser and open the url like http://www.google.com in the browser.
    Thanks in advance.

    yeah,somebody do it in his software,but i can't find its sourcecode.
    yesterday i did it and it works fine,but it can't work on windows platform and maybe it has bug.So i want to find a good way to solve it and it can works on any platform.
    Thanks your reply.

  • Open url from my application??

    Hi guys,
    I'm using jdev 10.1.2 and adf bc's. In my application i have a table which stores links for a number of websites. So I have a jsp which lists all the records from this table. When the user clicks on the link, the relevant page should open up in a new browser.
    here's the code:
    <a href ="<c:out value="${Row['Link']}"/>" target="_blank"><c:out value="${Row['Link']}"/></a>
    The problem is that while the href has the value of the link, it tries to launch the link from my application so that the URL is:
    http://10.64.102.92:8990/Trademarks-View-context-root/www.google.ie
    instead of just http://www.google.ie
    any ideas of how to remove the part preceeding the address would be most welcome.
    thanks in adavance,
    newbe.

    sorry, problem solved. i just had to put http:\\ in front of the value of the c:out

  • To open an external URL from your application

    Hello All,
    Please guide me in below scenario as I am new to SAP UI5.
    I have created a SHELL application with 5 tabs.
    We have a requirement where on clicking of a tab in the application it should open an external url. I am using "link" element of sap.ui.commons library. On press of link to action function I am using below code to open external url content.
    location.href = "http://google.com";  
    It is opening in the same tab but I have been navigated away from my application.
    As per the requirement external url content should be opened  without navigating away from my application.
    I am attaching the screenshot.
    Thanks
    Ansuman

    Hi Jagadeesh,
    See this code for reference.
    This is my view.
    sap.ui.jsview("demo.view1", {
           /** Specifies the Controller belonging to this View.
           * In the case that it is not implemented, or that "null" is returned, this View does not have a Controller.
           * @memberOf demo.view1
           getControllerName : function() {
                  return "demo.view1";
           /** Is initially called once after the Controller has been instantiated. It is the place where the UI is constructed.
           * Since the Controller is given to this method, its event handlers can be attached right away.
           * @memberOf demo.view1
           createContent : function(oController) {        
                         var btn1 = new sap.ui.commons.Button({
                               text: "This Is View One."
                         var link = new sap.ui.commons.Link({
                               text: "view3",
                          press : function() {                          
                                $("#frameId").slideDown();                                 
                         var iframe = new sap.ui.core.HTML("frameId",{
                          content : "<iframe src=" + 'http://www.jnvbuxaralumni.com' +" width='100%' height='700px'></iframe>",
                         var ele = [btn1, link, iframe];
                         return ele;         
    This is my controller.
    sap.ui.controller("demo.view1", {
           onAfterRendering: function() {
                  $("#frameId").hide();
    This is my index.html.
    <!DOCTYPE HTML>
    <html>
           <head>
                  <meta http-equiv="X-UA-Compatible" content="IE=edge">
                  <meta http-equiv='Content-Type' content='text/html;charset=UTF-8'/>
                  <script src="resources/sap-ui-core.js"
                               id="sap-ui-bootstrap"
                               data-sap-ui-libs="sap.ui.commons,sap.ui.ux3"
                               data-sap-ui-theme="sap_bluecrystal">
                  </script>
                  <!-- add sap.ui.table,sap.ui.ux3 and/or other libraries to 'data-sap-ui-libs' if required -->
                  <script>
                               sap.ui.localResources("demo");
                               //jQuery.sap.require("sap.ui.core.routing.Router");
                               //jQuery.sap.require("sap.ui.core.routing.HashChanger");
                               var oShell = sap.ui.ux3.Shell("shellId",{
                                      appTitle: "Shell Demo Program",
                                      showLogoutButton: false,
                                      showSearchTool: false,
                                      worksetItems: [
                                             new sap.ui.ux3.NavigationItem("homeId", {
                                                    key: "view1",
                                                    text: "Home"
                                             new sap.ui.ux3.NavigationItem("contactUsId", {
                                                    key: "view2",
                                                    text: "Contact Us"
                                      worksetItemSelected: function(e){
                                             this.removeAllContent();
                                             var selected = e.getParameter("key");
                                             var view = sap.ui.getCore().byId(selected);
                                             //console.log(selected);
                                             if( view == undefined){
                                                    view = new sap.ui.view({
                                                           id: selected,
                                                           viewName: "demo." + selected,
                                                           type: sap.ui.core.mvc.ViewType.JS
                                             this.addContent(view);
                                      content: [
                                                    new sap.ui.view({
                                                           id: "viewId1",
                                                           viewName: "demo.view1",
                                                           type: sap.ui.core.mvc.ViewType.JS
                               oShell.placeAt("content");
                  </script>
           </head>
           <body class="sapUiBody" role="application">
                  <div id="content"></div>
           </body>
    </html>
    Here you can see that on click of the link button i am able to display frame in same tab of shell.
    Let me know if it's helpful.
    Regards
    Dhananjay

  • Opening an URL from a JAVA application

    hi,
    iam new to Java.
    Currently iam designing a simle GUI which takes input(URL) from user in a test field and has a button.Upon clicking button i want to open the webPage specified by that URL in a default webBrowser.
    How can i do that(opening webPage)?
    advanced thanks for your help.
    vd.rach

    getting an error on that line as follows: "unreported
    exception; must be caught or declared to be thrown".exec() throws IOException so catch it.
    try {
    Runtime.getRuntime.exec(...);
    catch(IOException e) {
    System.err("Cannot launch the browser: " + e.getMessage());
    }On the side note: I found javaworld's [url http://www.javaworld.com/javatips/jw-javatip66_p.html]solution most useful in serving this purpose in a project, even though its a little bit platform specific.

  • If I open another URL from my homepage, the "go back one page" button is grayed out so I can't get back to my home page.

    This problem only started recently.
    Opening another web page (URL) from my homepage always opens in the same tab and the "go back one page" button is gray and does not work. If I open a series of web pages in the same tab the green "back" button is green. Clicking on the "recent pages" down arrow will allow me to go back, but only to the page after the home page.
    In other words, after browsing, I can get back to the opening page (my home page) only by clicking on the house icon but not by using the "recent pages" function.
    Is there an option that changed after the last update?

    Do you see any tab history if you right click the Back or Forward button?
    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]]

  • Calling PL/SQL Functions And Open Oracle Reports From ADF Application

    Hi all,
    My company will convert some projects from Oracle forms to Oracle ADF so, we need to call the PL/SQL functions and open the Oracle Reports (which are already exist) from ADF Application.
    Thank You..
    Jack.N

    Hi Jack.N,
    calling PL/SQL Functions -----> http://sameh-nassar.blogspot.com/2010/01/create-plsql-function-and-call-it-from.html
    Open Oracle Reports ---------> http://radio-weblogs.com/0137094/2008/06/15.html
    You will find The Integration between ADF and other systems in ---> http://wiki.oracle.com/page/ADF+Integration
    Sameh Nassar

  • Open OBIEE report from web application

    Experts, I want to open OBIEE report from a web application. I have a question regarding the security here. Say I login as 'USER1' in web application, I would have to pass 'USER1' in nquser parameter. Correct? Also, this report has access to 'Sales Group' users only. So, does 'USER1' in web application need to be assigned to 'Sales Group'? Or, any user in the web application can open this report as long as I pass nquser in the GOURL.
    thx,
    parag

    You don't need to specify group details.
    When the report hits OBIEE, it will determine the permissions based on the nquser.
    Hope it helps.

  • Issue in opening an URL from UI

    Hi Experts,
    When clicking  button in an assignment block of campaign screen, it should open an URL (SRM screen) in new window.
    I have written the following code in htm page inside script tag.
    window.open("lv_url").focus();
    lv_url is obtained from the eventhandler onclick.
    First time, when I click on the button, the URL is opened in the new window successfully. If I close that window (SRM screen),
    and click on the button again, it is executing the code window.open but not opening a new window. Please help.
    Thanks,
    Ramya

    Hi Ramya,
    The problem is with the window handler. That is the window handler doesnt terminate even when you manually close the new window and so when attempting to open a same url it doesnt show up.
    One solution is to generate a guid and pass it with the url so that the url will differ (since the guid differes the url will not be the same). Check the below sample code,
    <%
    CALL FUNCTION 'GUID_CREATE'
       IMPORTING
         EV_GUID_32       = lv_guid.
      CONCATENATE 'guid=' lv_guid INTO lv_query.
      CALL METHOD cl_crm_web_utility=>create_url
        EXPORTING
          iv_path                     = lc_path
          iv_query                   = lv_query
          iv_absolute               = lc_flag
          iv_in_same_session = lc_flag
          iv_server_object      = server
          iv_no_cookie            = 'X'
        RECEIVING
          ev_url                       = lv_url.
    %> 
    <scirpt language="javascirpt">
         window.open(' <%= lv_url %> ');
         window.close();
    </script>
    Regards,
    Arun

  • Calling a Taskflow present in one App using a url from another Application

    Hi,
    I a have a requirement to call a taskflow present in another Application using a url from present JDEV Application.
    Is that possible in JDEV 11g? Can anyone give me an example.
    Thanks,
    User
    Edited by: user617801 on Feb 24, 2009 11:24 AM

    Hi,
    Check out this example . It is for TP4, but it should be the same on WLS.
    Pedja

  • Open a URL from Servlet

    Hi,
              I'm running a servlet and wants to open a URL for a file, how do I do that ?
              (To get the same effect as if I open the file from a browser)
              thanks in advance..
              ..Per
              

    If you mean to read the contents of a URL, then see URL.getConnection. If
              you mean to download a file to a browser, then search this newsgroup for
              "download".
              Cameron Purdy
              Tangosol, Inc.
              http://www.tangosol.com
              +1.617.623.5782
              WebLogic Consulting Available
              "Per Lovdinger" <[email protected]> wrote in message
              news:3a9a7650$[email protected]..
              > Hi,
              >
              > I'm running a servlet and wants to open a URL for a file, how do I do that
              >
              > (To get the same effect as if I open the file from a browser)
              >
              > thanks in advance..
              > ..Per
              >
              >
              

  • Opening a URL from a Java Program

    Hi all,
    Can I open Internet Explorer and invoke a URL from a Java Program. If it can be done, could someone please give a code for that.
    Thanks in advance.

    Did you try it like "start \"http://java.sun.com\""
    or maybe
    "start 'http://java.sun.com'"I've no idea whether that will work, but it would be the first thing I'd try.

  • How can I open a URL from a Custom Button in a second help window?

    I have a custom button, which currently opens a URL in a web
    browser, using a redirect page. How can I change this so that it
    opens in a second help window instead? If I understand some of the
    posts I've read, it is possible by linking the button to a related
    topics function but I've no idea how this is done.
    As usual, your help is most appreciated. Thanks a lot.

    Hi, ecoulyn,
    You need to make a topic file like the one below the target
    of the Jump button.
    The onLoad function on the Body start-tag causes the Related
    Topics command to fire when the topic file is loaded in the topic
    pane. When specifying the file name of the topic to display in the
    secondary window, you must always prepend it with the name of your
    .chm file, followed by "::/". Otherwise, an error message appears
    when the Jump button is clicked.
    Pete

  • Open a URL from InDesign (JS OSX CS3)

    Hi -- I have some limited experience javascripting In InDesign. Most of what I have done focuses on text and documents, so I need to ask a question that is outside my current experience.
    I am trying to write an Indesign script that when deployed by a user opens a URL in a Web browser. It would be the same url every time -- not dependent on any hyperlinks that may or may not be in a document.
    Is there anyway for me to use a Hyperlink.showDestination()function to accomplish this using this static URL within the script? If so, I am unsure how to proceed.
    Any thoughts would be greatly appreciated.
    thanks

    Check out this post.
    Kasyan

Maybe you are looking for

  • Regular timeouts and slow system

    Team, We are regularly getting timeouts for users on our IDES system. This is a dump of our ST02 screen: System:                  sap6ides_C10_00             Tune summary Date + Time of Snapshot: 18.08.2010      11:32:32    Startup:     20.04.2010 19

  • TS1369 Ipod is recognized by my computer but not iTunes

    When i plug my ipod into my computer i can not find it on itunes. when i go to whats on "This PC" it shows up there; just like when you plug in a jump drive, but not on iTunes. How do i fix this??

  • How do I transfer all files from one mbp to another mbp

    I want to duplicate the mbp that I use at home to another mbp for work. How do I do it?

  • Acrobat Pro 9 "Licencing for this product has stopped working."

    I have uninstalled the program and reinstalled, that did not work. I also downloaded the license repair tool and followed those steps (extract, run, reboot, run, reboot, press 0) and I still get this message when I try to open acrobat pro. I have my

  • Hide Scratch with Skin or Sticker

    Hello all! I got a minor scratch on the top lid of my MacBook Air (carried it around carelessly in the first few days of purchase -- thinking that made from aluminum it would withstand external strains). Not wishing to observe the damage every time I