Open a URL in default web browser

HI
I have to open a URL Link (any one) using my application....
I have a menu option -> online help
So i have to open a web page (already defined) in a default web browser of windows.
Please suggest me way to solve this problem?
Thanks in advance
tiger

In Java 6: see java.awt.Desktop.browse(URI)
In earlier Java versions: Look for the JDIC library, which is the predecessor of that API.

Similar Messages

  • Open a URL in default web browser's new window

    HI
    As i have posted a question in my previous post
    http://forum.java.sun.com/thread.jspa?threadID=5235957&tstart=200
    I have formulate a code for that as follows :->
    String url= "http://www.google.com";
    String os = System.getProperty("os.name").toLowerCase();
            Runtime rt = Runtime.getRuntime();
            try{
                   if (os.indexOf( "wie" ) >= 0) {
                                        // this doesn't support showing urls in the form of "page.html#nameLink"
                rt.exec( "rundll32 url.dll,FileProtocolHandler " + url);
                 } else if (os.indexOf( "mac" ) >= 0) {
                     rt.exec( "open " + url);
                 } else if (os.indexOf( "nix") >=0 || os.indexOf( "nux") >=0) {
                                  // Do a best guess on unix until we get a platform independent way
                                    // Build a list of browsers to try, in this order.
               String[] browsers = {"epiphany", "firefox", "mozilla", "konqueror",
                                              "netscape","opera","links","lynx"};
         // Build a command string which looks like "browser1 "url" || browser2 "url" ||..."
                    StringBuffer cmd = new StringBuffer();
                  for (int i=0; i<browsers.length; i++)
              cmd.append( (i==0  ? "" : " || " ) + browsers[i] +" \"" + url + "\" ");
                      rt.exec(new String[] { "sh", "-c", cmd.toString() });
                              }catch (IOException e){
                                 System.out.println("OS not compatible");
                                         }but it opens a page in already last opened window...and over writes it ....
    what i required to open it in a new window of the web browser
    so please suggest me the way to do it....
    Thanks
    vivek
    .

    you can open browsers new window using jdic...
    unfortunately Desktop.browse() doesnt allow to do that, but we can do that another way:
            String urlToOpen = "http://forum.java.sun.com/thread.jspa?threadID=5236723";
            BrowserService browserService = (BrowserService) ServiceManager.getService(ServiceManager.BROWSER_SERVICE);
            try {
                // exactly "_blank" allow to open necessary url in a new window :)
                browserService.show(new URL(urlToOpen), "_blank");
            } catch (LaunchFailedException e) {
                e.printStackTrace();
            } catch (MalformedURLException e) {
                e.printStackTrace();
            }

  • Opening emails in my default web browser

    Is there anyway to select a number of emails in Apple Main and have them open or display in my default browser? Perhaps a plugin? This would be like Eudora's Open in Browser command.
    TIA,
    Bill

    Yeh O know. I want to change that behavior and open them locally in the browser. from within mail.

  • On opening default web browser in P1i shows error as "Corrupt"

    Hi All,
    I am Mahesh. This is my first thread in this forum. I have Sony Ericsson P1i. I purchased it 2 and half years ago.
    Whenever i open the default web browser. i get the error saying "Corrupt". Can you guys suggest me how to fix this problem or reinstall the browser again?
    Although i have Opera mini but this default browser is required for me because Track ID (which recognises the song) uses this default browser.
    Thanks in advance.
    Mahesh

    Try updating or re-installing the phone's software using the SE update service on your PC, and see if this restores the browser.

  • Launch a default web browser from my java application

    Hello,
    I have been trying to launch my default web browser from my java application, but am unable do it. Right now, I am using ---- "Runtime.getRuntime().exec("cmd /c start <url>"); to launch my webbrowser. It launches the browser but displays the command prompt for a second or so, and then replaces my already existing page with the new url.
    Is there any way for me to launch the url in a completely new browser each and every time. And I don't want the command prompt to show up for a sec. Please help...!
    Thanks in advance.
    -BusyBusyBee

    If by any chance your application is an Applet, you can use this to open a new browser window:
    getAppletContext().showDocument(new URL(theUrl), "_blank");
    But, you probably would have specified if that were the case. Oh well. Hope it helps someone!
    -sheepy.

  • [SOLVED] Firefox won't start - "Failed to execute default Web Browser"

    I've just updgraded from Firefox 3 to version 4 (by running "pacman -Syu") on my 64-bit Arch installation.  I started XFCE and Firefox 4 worked fine for a few minutes before crashing and closing automatically.
    A short while later (long enough to forget exactly what I was doing when it crashed!) I tried to run it again, but got the error message Failed to execute default Web Browser. / Input/output error.
    I've tried rebooting the PC and re-installing firefox & firefox-i18n, but still get the same error.  If I run "firefox" from a terminal window, I get the following response:
    OpenOffice path before fixup is '/usr/lib/openoffice.org3'
    OpenOffice path is '/usr/lib/openoffice.org3'
    *** NSPlugin Wrapper *** WARNING:(/build/src/nspluginwrapper-1.3.0/src/npw-wrapper.c:3160):invoke_NP_Initialize: assertion failed: (rpc_method_invoke_possible(g_rpc_connection))
    NOTE: child process received `Goodbye', closing down
    OpenOffice path before fixup is '/usr/lib/openoffice.org3'
    OpenOffice path is '/usr/lib/openoffice.org3'
    firefox: symbol lookup error: /usr/lib/mozilla/plugins/libvlcplugin.so: undefined symbol: NPP_Initialize
    I'm not sure why there are so many references to "OpenOffice"...
    Can anyone offer any suggestions as to how to get Firefox working again?  (Thanks in advance!)
    Last edited by esuhl (2011-03-25 00:40:19)

    ^-Ubermensch-^ wrote:https://bugs.launchpad.net/ubuntu/+sour … bug/722690
    Thanks for that.  After I posted my last message, Firefox crashed again on a website containing embedded video.  I disabled the add-on, but when VLC was updated, I guess it installed and enabled the add-on again.  Firefox worked fine initially, but I've just tried to open it again and the same "input/output error" message appeared.  I rebooted, but the problem persisted.
    Uninstalling the vlc-plugin package seems to have resolved that, though.

  • If I set Firefox as my default web browser, the help links on Adobe Dreamweaver and Flash's welcome screens don't connect to the help pages on Adobe's site. It just links to Firefox's start page and stops. The links work properly if Safari is set to the d

    If I set Firefox as my default web browser, the help links on Adobe Dreamweaver and Flash's welcome screens don't connect to the help pages on Adobe's site. It just links to Firefox's start page and stops. The links work properly if Safari is set to the default browser. Please help.
    == URL of affected sites ==
    http://www.adobe.com

    Hello,
    Many site issues can be caused by corrupt cookies or cache. In order to try to fix these problems, the first step is to clear both cookies and the cache.
    Note: ''This will temporarily log you out of all sites you're logged in to.''
    To clear cache and cookies do the following:
    #Go to Firefox > History > Clear recent history or (if no Firefox button is shown) go to Tools > Clear recent history.
    #Under "Time range to clear", select "Everything".
    #Now, click the arrow next to Details to toggle the Details list active.
    #From the details list, check ''Cache'' and ''Cookies'' and uncheck everything else.
    #Now click the ''Clear now'' button.
    Further information can be found in the [[Clear your cache, history and other personal information in Firefox]] article.
    Did this fix your problems? Please report back to us!
    Thank you.

  • Can't set Safari as default web browser

    I recently installed Firefox as a back up web browser for when I have problems with Safari. Now whenever I click a link in an email it opens up Firefox even though Safari is already opened. My default web browser has set itself for Firefox and has even removed Safari as an option! I have to choose "Select" to get to my apps folder to choose Safari. But even then the email links insist on opening Firefox and when I restart my computer, Firefox is once again the seleceted browser in the Safari prefrences. How can I keep this from happening?

    Hello Jazlow,
    I believe to change the default browser all you have to do is open Safari -> Preferences -> General -> Default browser. That should change it for you.
    Didn't finish reading the last post. You can try to delete the firefox preference file org.mozilla.firefox.plist or using a program like pref setter to edit the apple.safari.plist though I wouldn't recommend that unless your very familiar with the OS. Sorry I couldn't be of more help.
    HTH
    Tim

  • Portal with a URL using a Web browser in java stack

    Dear all,
    I can access the portal with our URL using a Web browser from your client machines .
    i got the following option :
    SAP Library
    SAP Library contains the complete documentation for SAP Web Application Server.
    Web Services Navigator
    Web Services Navigator is a tool that gives you a short overview of a specific Web service based on its WSDL, and enables you to test your Web service by creating and sending a client request to the real end point.
    System Information
    System information provides administrators with an overview of the system configuration and its state. It shows all of the system's instances and processes, their current state and important parameters (such as ports) that may be required for support cases, as well as the versions of the components installed.
    UDDI Client
    The UDDI client provides query and publishing functions for different Web service entities (tModels, business services) to any UDDI compliant registry.
    User Management
    The user management administration console provides administrators with the functions they need to manage users, groups, roles, and user-related data in the User Management Engine (UME). Users without administrator permissions can use it to change their user profile.
    Web Dynpro
    Web Dynpro is a User Interface technology available within the SAP NetWeaver Developer Studio.
    Various Web Dynpro tools provide administrators and application developers with performance measurement and application administration capabilities. The Web Dynpro runtime is already deployed.
    SAP NetWeaver Administrator
    A tool for administration and monitoring, offering a central entry point to the whole SAP NetWeaver system landscape. The SAP NetWeaver Administrator can be used in a central scenario where it is capable of operating an entire system landscape containing ABAP and Java systems as the application platform of SAP NetWeaver.
    J2EE Engine Examples
    This section contains several J2EE application examples that run on the J2EE Engine. The examples show some of the functions of both Java and the J2EE Engine. They can be easily deployed and tested by simply clicking on a button. The full source code of the examples is also available.
    when i click System Information:
    it ask user name () J2EE_ADMINand password (Installtion master password) ,after entered , i got below error .
    You are not authorized to view the requested resource.
      Details:   No details available
    Kindly suggest .

    Hello
    It means what it sais, your J2EE_ADMIN user doesn't have enough authorization.
    Chech if the appropriate authorization is assigned in your abap stack which belongs to the java stack you logon to:
    Role SAP_J2EE_ADMIN should be assigned to user J2EE_ADMIN.
    Kind regards
    Tom
    Edited by: Tom Cenens on Dec 17, 2010 2:55 PM

  • Linking to a website and launching default web browser

    I'm nearly finished with my most ambitious game ever. I would like to link to my website where I have several of my other games. I want the button to launch the users default web browser and automatically go to my website. Any help will be greatly appreciated!
    Jeff
    P.S. If you'd like to check out some of my Director work, my website is www.sokovideo.com

    Thanks a lot!
    I used...
    on mouseUp
       goToNetPage "www.website.com", "_new"
    end
    Jeff

  • Opening qries (BEX7.0) through web browser

    Dear Experts
    I have created a query using Query Designer (BEX 7.0) and now I want to open or execute it in WEB Browser . Pl. mention all the steps............
    Thanks in advance
    Dinesh Sharma

    Hi Dinesh,
    In the Query designer itself, there is a option of executing the report. So execute it from designer itself and the result will be navigated to a web browser. There you can mark this report as a favorite or create e a bookmark for the same for the future reference.
    Regards,
    Pratap Sone

  • How to set my default web browser

    I remember choosing between Netscape and Internet Explorer my default browser nearly four years ago. Now I can't remember how to do it again. My browsers currently are Netscape 7.2 and IE 5.2.3.
    Thanks in advance.
    ~~Raymon

    Never mind, friends.
    I got a clue from doing a search on "default browser". Hello!
    It's System Preferences/Internet --> Web tab --> Default Web Browser.
    ~~Raymon

  • Changing Default Web Browser After Reboot

    Hello,
    I am using Webkit as my default browser and every time I reboot the machine, it keeps changing my default web browser back to Safari.
    I have used the settings in the preferences pane in Safari and applied the changes and after reboot it still occurs. I have read somewhere (I do not remember what website) that FileVault has something to do with resetting my saved settings. I do have FileVault enabled on my system.
    Thanks for your help,
    supersmooth

    I would like to advise anyone reading this post that after some more researching, I have found several other posts in different forums that deals with this topic.
    Although the suggestions within the other posts did not work, I did try them and had no resolve.
    Here are the other posts within the links posted below;
    http://forums.macosxhints.com/archive/index.php/t-72578.html
    http://forums.macrumors.com/showthread.php?t=531812
    http://discussions.apple.com/thread.jspa?messageID=8587195
    I hope that anyone reading this post and the other provided above can use them to help shed some light on this issue or possible resolve it.
    Once again, thank you for your time,
    supersmooth

  • Safari prefs show zsh in default web browser

    I have uninstalled firefox and trashed all preferences and the application support folder. Now for some reason, in Safari preferences in the default web browser drop-down there is an item labeled with a folder named 'zsh'. This shows up along with Safari. When I install Firefox it goes away and changes back to Firefox. Not a big deal but I would like to get rid of the zsh since Firefox has been uninstalled. Anyone else see this?

    Well, no responses and couldn't find a **** thing on how to fix this. My obsessive compulsive behavior prevailed and I reinstalled the OS.

  • HT1677 How can I change default web-browser?

    Dear Apple
    I love my iPhone 4S and iPad. But I can't find how change default web browser on iOS? If this OS doesn't do it. Could you tell about it in future?

    You can indicate your interest in such a feature to Apple via their feedback pages:
    http://www.apple.com/feedback
    We're all just fellow users here.
    Regards.

Maybe you are looking for