How to open a browser from a program??

How can i open a browser to a specific page from my aplication??

Or if it's a desktop application, you can use the Runtime class to execute an app. The following will open up MS Access Database. Just change the string to point to the application you want to run.
String app = "C:\Programs Files\Microsoft Office\Access\Msaccess.exe";
Runtime rt = Runtime.getRuntime();
Process p = rt.exec(app);
p.waitFor();
Hope that helps!!
Taji

Similar Messages

  • How to open web browser from midlet on emulator

    Hi,
    I am using Java ME Platform 3.0 SDK. I want to open web browser on emulator.
    What should I do?
    Thanks.

    Hi,
    web browser is not a part of the emulator. The first think you have to do is to download mobile web browser. If you have mobile web browser downloaded go to Java ME SDK 3.0. There is Device Selector window in the bottom left corner. In this window you can see all emulators available in Java ME SDK 3.0. Choose an emulator you want to use and right click on it. In popup menu select "Run JAR or JAD..." action, in file chooser browse you mobile web browser and open it. That's all.

  • How do I save and import my bookmarks from another hard drive? When I try to open the installed Firefox on the old drive, it (obviously) opens a browser from the new main drive, free of bookmarks. Is there a way I can save the bookmarks on the old drive w

    How do I save and import my bookmarks from another hard drive? When I try to open the installed Firefox on the old drive, it (obviously) opens a browser from the new main drive, free of bookmarks. Is there a way I can save the bookmarks on the old drive without opening a browser?
    The guts of my computer were rearranged and I got a new main hard drive. My old one is still in there and I can get stuff from it, but when I go to the Mozilla folder on the old one, I can't figure out if there's anything I can do to get all my bookmarks from that drive to my new one, where Firefox is newly installed.

    If you open Firefox then Firefox will always use the default profile folder as found via profiles.ini on your system drive.
    You either need to import the file in your current default profile or copy the file to your current profile folder while Firefox is closed.
    Firefox 3 stores the bookmarks and the browser history in [http://kb.mozillazine.org/places.sqlite places.sqlite] and no longer creates an HTML backup by default.
    There are also (five) JSON backups in the bookmarkbackups folder within the Firefox profile folder.
    You can either copy the file places.sqlite to your [http://kb.mozillazine.org/Profile_folder_-_Firefox Firefox Profile Folder] or import the most recent JSON backup from the bookmarkbackups folder of that old profile.
    See:
    http://kb.mozillazine.org/Backing_up_and_restoring_bookmarks_-_Firefox
    http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox
    See http://kb.mozillazine.org/Profile_folder_-_Firefox
    "Application Data" in XP/Win2K and "AppData" in Vista/Windows 7 are hidden folders.
    See http://kb.mozillazine.org/Show_hidden_files_and_folders
    Go to: Control Panel > Folder Options > "View" tab > under "Hidden files and folders", select "Show hidden files and folders".
    You may want to un-check the box "Hide extensions for known file types" to see the file extensions of all files.

  • How to start a browser from within a java program?

    I want to make a help file for my java program and want to run the browser from the menu of my program.
    How can I start my browser from my program?
    A small code will be helpful.
    Thanks.
    Niteen

    This should work on Windows without having to know where the browser is located. See http://www.javaworld.com/javaworld/javatips/jw-javatip66.html for more details
      public static void viewHtml(URL url, boolean fixHtmlExtension){
          String cmd = "rundll32 url.dll,FileProtocolHandler " + url.toExternalForm();
          if (fixHtmlExtension){
            //There is a bug in rundll32. For http requests, it doesn't like .html or .htm extensions,
            //but replacing the 'm' with '%6D' works. 
            //This fix is not needed for file requests.
            if (cmd.endsWith(".htm")){
              cmd = cmd.substring(0,cmd.length()-1) + "%6D";
            else if (cmd.endsWith(".html")){
              cmd = cmd.substring(0,cmd.length()-2) + "%6Dl";
          Process process = Runtime.getRuntime().exec(cmd);
          try{
            process.waitFor();
          catch(InterruptedException e){

  • How to open a browse a folder dialog box

    Hi,
    Please tell me,
    how to open a 'browse a folder' dialog box in java SE. I dont need showopenDialog or showSaveDialog methods.
    User have to be prompted to select a folder(not a file), and clicks on 'OK'. That path have to come in a text field.
    In my program user has to give a folder path....

    bhuvanavijayam wrote:
    Thank you very much..........
    i got the answer............ we have to set
    jfilechsr.setFileSelectionMode(1);
    1 -> DIRECTORY_ONLY
    No!
    Never use "Magic Numbers" They may change in a future verison and your code will break. Also anyone who reads your code (that includes you, months/years from now) won't know what the code is supposed to do.
    jfilechsr.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);Not DIRECTORY_ONLY
    db

  • Opening a browser from an applet

    I got a problem, I want to open a browser from my applet, but I just found one way:
    getAppletContext().showDocument(new URL(
    "http://www.java.sun.com"), "_blank");
    but the problem is: with this, the default browser with defaul settings is opened, and that's what I don't want...
    how can I open the browser with some settings (for example size, or no-url-bar, etc)
    thx for help

    hi,
    try this code:
    public void showDocument(java.net.URL url, String targetWindow)
    when targetWindow can be:
    "_blank" Display the document in a new, nameless window.
    "windowName" Display the document in a window named windowName. This window is created if necessary.
    "_self" Display the document in the window and frame that contain the applet.
    "_parent" Display the document in the applet's window but in the parent frame of the applet's frame. If the applet frame has no parent frame, this acts the same as "_self".
    "_top" Display the document in the applet's window but in the top-level frame. If the applet's frame is the top-level frame, this acts the same as "_self".

  • Browser enabled InfoPath form not opening in browser from a link in a Task list

    I have a browser enabled InfoPath deployed to SharePoint as a template in a Forms Library. The form opens in the browser when a user navigates to the Form library and clicks New.
    There is an Approval workflow associated with this form which kicks in whenever a new Form is submitted. The workflow creates a task in a task list. The task list shows a Link column which provides the link to open the form. Now, when a user clicks on the
    link (in the Task list), the form always open in InfoPath instead of opening in a browser.
    I see that the URL for the form (http://<Server>/Training/Enrollment%20Forms/<FormName>.xml)  is same in both the Forms Library and Task list link.
    What am I doing wrong or what do I need to do to make the form open in browser from the Task list link.
    Thanks
    Rajat

    This question is asked constantly - we just discussed this last week, I believe - so you can probably find a lot more discussion to help you out if yous earch within this form or browse through the topics.  The reason for your issue is because of
    what you just wrote - the URL is directly to the XML file, so it tries to invoke InfoPath.  Browser forms are rendered by Forms Services, which has a much different URL.  Go click on one of your existing forms, and notice how different the URL is. 
    To get forms to open in the browser when invoked from a different location, you must use this full Forms Services URL.  Built-in workflows only generate a link to the XML file, and since the task in a different list than the form, then it has no idea
    how to open the form in the browser.  Only users who don't have InfoPath installed will see it in the browser automatically.  This is why I generate my own URLs dynamically with custom workflows and don't use OOTB workflows.SharePoint Architect || Microsoft MVP ||
    My Blog

  • Open a browser from swing panel

    How can we open a browser from a swing panel? I want to open a browser from my panel, when i hit on a button or a link?
    Second question how can i create a link in a panel?
    Thanks

    odd, someone just asked that:
    http://forum.java.sun.com/thread.jsp?forum=57&thread=555001&tstart=0&trange=15

  • How to open the browser in a Tab

    How to open the browser in a new Tab when click on the URL.
    My problem is i have one DataGrid that contains
    "Name,Designation,Company URL".
    After running the program Name,Designation,URL are displayed
    in the DataGrid .
    I have Four URL's in Datagrid ,the four URL's are opening in
    the different tabs when the user click on the URL.
    How can i do these three things in Flex.
    Thanks & Regards,
    Srinivas.

    Hi,
    Please check the sample in the URL below.
    http://raghuonflex.wordpress.com/2006/12/07/flex-i-frame/
    Hope this helps.

  • Why does it take 3 goes to open my browser from my desk top?

    It takes me 3 attempts to open my browser from my desktop icon. 3 lots of double clicks before Firefox will open. Things changed about a week ago. All was well before then. What has happened?

    I would have thought if you select a program to come to the forefront it is
    "active"and ready to use?  Is this an issue or am I doing something wrong? 
    Thanks
    Tried this on my setting but after having clicked on the icon the Bridge
    window is present, ready and active. No need for an click here.
    Have you already tried system maintenance for OS using Apple Disk utility to
    check and repair permissions?

  • How to open "All Tabs" from previously shown pages history?

    Hi,
    How to open "All Tabs" from previously shown pages history. I am not asking about "Reopen from last session". I am asking about how to open all tabs from previous webpage links from a past date from history, currently its allowing me to select each page link manually by clicking it.
    Thank you!

    Select the first item you wish to open, scroll down to the last, Shift-click that one & all those between should be selected too. Double-click on them & they should all start to open... or you can copy & then drag/paste into a new or existing bookmarks folder.

  • How to open web pages from japplet??

    Hi
    Does anybody know how to open web pages from java japplet??
    Any help is apreciated!
    zick

    the getAppletContext() method of the Applet class will get you an AppletContext, with which you can call the ShowDocument(URL url) or ShowDocument(URL url, String target) method...
    check it out at http://java.sun.com/j2se/1.4/docs/api/java/applet/AppletContext.html
    have a good one :)
    Jay

  • How to Access Maintenance View from a program

    Hi Experts,
    I have created a maintenance view for a table. i want to insert data's into the table through the maintenance view. I don't know how to access the view, how to insert data into the Maintenance view. Please suggest me how to access the view from the program.
    with regards,
    James...
    Valuable answers will be rewarded...

    Hi,
    What is the need to search for a program.
    Use transaction SM30 or SE16 to create or maintain entries in the table.
    e.g. if the Maintenance view is created on table A, then Goto transaction SM30 or SE16 and give the table name as A and proceed. This will automatically take u to the maintenance view on tha table A.
    Regards,
    Himanshu

  • How to stop the Browser from caching my web pages

    Hi There
    Can anyone tell how to stop the browser from caching my jsp pages
    I am using
    <%response.setHeader("Cache-Control","no-cache");
    response.setHeader("Pragma","no-cache");
    response.setDateHeader ("Expires", 0);
    %>
    but this does not work anduser is able to go back to the previous page
    which i dont want and i want the browser to display the message the page has expired
    Help appreciated
    Thanks
    Mumtaz

    response.setHeader("Cache-Control", "no-cache");
    response.setHeader("Pragma", "no-cache");
    response.setDateHeader("max-age", 0);
    response.setDateHeader("Expires", 0);
    I have cut paste the code from my jsp which is working. There is one additional line. I do not know if that is the cause but there is no harm in trying that out.
    Srinivasan Ranganathan

  • How to open a pdf from pdf target with page no using javascript

    Hi
    How to open a pdf from pdf target with page no using javascript
    Thanks in Advance.

    Hello,
    <p>Web.show_document calling .htm files saved on disk.....</p>
    Francois

Maybe you are looking for

  • Integrating with sap , some doubt

    Hello friends , i am trying to integrate my JBOSSMQ of JBOSS4.0 APP Server with SAP. For that i need to set few parameters in SAP like the QueueConnectory Factory, Queue , etc. I found out that the QueueConnectoryFactory is org.jboss.mq.SpyConnectorF

  • AIR installation error through browserAPI

    Hi, I am using the badge.swf for my adobe AIR app. installation. I am gettong the following error:- Config: OS - Microsoft XP Professional Service Pack 3 CPU - Intel Core 2 Duo T9600 @ 2.80GHz AIR Vresion - 2.6.0.19120 My app-xml has first line as < 

  • HT4554 How big of download is the new 5.1 IOS software update?

    How big of download is the new 5.1 IOS software update?

  • Any one else struggling with 3G since doing an iOS 6 upgrade?

    Hi everyone, I have an iphone 4 on a Tesco contract (I'm in the UK).  Upgraded from iOS 5 to iOS 6 2 days ago through itunes on my mac.  All seemed to go well... Other than I cant use 3G. The 3G symbol is on the status bar next to my carriers name an

  • VC Tabel view size limitation

    Hi, I have a VC model displaying query results in a table view. When the query is executed it is listing around 7000 records, but with VC model seeing only 500 records in the table. Is there any setting to adjust the table size to display the whole q