Opening the default browser.

Hello,
Is there a way to open the default browser of the system in a java application?
Is there any instruction which works for both Windows and Linux?
I only need to open the browser with a specified URL after a determined step in my java application.
Thanks,
Danilo

Control browsers from your Java application

Similar Messages

  • If Firefox is set as the default browser, and any application attempts to open a new window, this fails and I get the error "Firefox is already running..."

    Here is what I am running:
    Microsoft Windows 7, Service Pack 1, Fully updated to 4/10/2012
    Fresh Install of Firefox 11. No add-ons enabled as a result of troubleshooting.
    I am a user with administrator rights
    UAS is disabled.
    To begin, this has been going on Since Firefox 10 or so. A few months now.
    I am able to open Firefox. My add-ons worked (ABP, Flashblock, ABP Element Hiding Helper, IETAB2, Downthemall, Greasemonkey, 4chan extension) had no problems. Firefox is set and has been set for the last two years as my default web browser.
    However Since approximately Firefox 10 or so, maybe before that, If I have a Firefox session open, and any other application attempts to open a session in a new window, I get the Firefox is already running, but not responding error."
    I attempted to follow troubleshooting advice already posted (look for parent.lock files left behind [none present], multiple sessionstore.js files [none present], create a new user profile, attempted to clear out the "read-only" permission in windows 7, however as soon as it is cleared, the read only permission returns.)
    As a last resort, I deleted the Firefox folder, the %APPDATA%/Mozilla directory in its entirety, then utilized CCleaner to remove any and all references to Firefox in the windows registry, then did a full re-install, no extensions installed right now.
    I checked preferences and have the option "open new windows in a new tab" checked off. The problem persists regardless if this option is checked on or off. This problem persists in or out of safe mode, even with the brand new install.
    Test Cases:
    All cases:
    Firefox is selected as the default browser for windows 7
    Case 1: Open a firefox session. Utilize any other program that attempts to open a link to their website in a new browser window or new browser session. Experience "Firefox is already running" error
    Case 2: Open a firefox session. Right click on Firefox on the task bar. Select "open in new window". Experience "Firefox is already running" error
    Case 3: Open a firefox session. Select the Firefox Menu > New tab > New Window. A new window will actually open.
    This is the only method of opening a new window in the same browser session or profile that actually works on my system. Attempting to open a browser session from the task bar "open new window dialog" or opening a new window while a current window/session is running will not open firefox in a new window or a new tab in the current session. The "Firefox is already running, but is not responding" error will occur every time.

    Cor-el's suggestion resolved my problem. Apparently the MOZ_NO_REMOTE variable was set to 1 on my system variables. I never made it, and really have no idea how it got there, but deleting this variable and restarting firefox has resolved the issue. Thanks Cor-el!
    Marking case: Solved
    Solution: Verify the MOZ_NO_REMOTE variable is NOT set to 1. This can be achieved by simply deleting this variable.

  • How to open a URL in the default browser via CC HTML Extension?

    Hi,
    I'm trying to open a link via the default browser in a HTML Extension for Photoshop CC built with Extension Builder 3.
    With the initial example the "/indext.html" it look like this:
    <li><button class="default" id="btn_PHXS" onClick="onClickButton('PHXS')" disabled="true">Run ps code</button></li>
    and I changed the code from "/ext.js" to:
    ...function onClickButton(ppid) {    var csInterface = new CSInterface();    csInterface.openURLInDefaultBrowser('http://www.adobe.com');}...
    This is what the "/lib/CSInterface-4.0.0.js" looks like:
    * Opens a page in the default system browser.
    * @param url   The URL of the page to open. Must use HTTP or HTTPS protocol.
    * @return One of these error codes:\n
    *      <ul>\n
    *          <li>NO_ERROR - 0</li>\n
    *          <li>ERR_UNKNOWN - 1</li>\n
    *          <li>ERR_INVALID_PARAMS - 2</li>\n
    *          <li>ERR_INVALID_URL - 201</li>\n
    *      </ul>\n
    CSInterface.prototype.openURLInDefaultBrowser = function(url)
        return cep.util.openURLInDefaultBrowser(url);
    Since "util" doesn't seem to be defined  I get the message:
    Uncaught TypeError: Cannot call method 'openURLInDefaultBrowser' of undefined
    Is the something missing?
    Thx,
    frankin

    Hi Franklin,
    Apologies for the delay but I have been trying to determine why this API is not been working. I have since discovered that, although this API is documented in the JS library, the behaviour has yet to be implemented into Photoshop CC. Offline I will try to determine why this API was included in the library when it was not ready but for the meantime, if you would like to open a browser, here is a workaround:
    Instead of using:
    //(new CSInterface).openURLInDefaultBrowser("http://www.adobe.com")
    // Use the createProcess API to open a browser. The following shows a workflow in Windows to open Internet Explorer.  
    var csInterface = new CSInterface();
    var rootDir = "/";
    var isWindows = window.navigator.platform.toLowerCase().indexOf("win") > -1;
    if (isWindows) {
                        rootDir = csInterface.getSystemPath(SystemPath.COMMON_FILES).substring(0, 3);
    var processPath = "/usr/bin/open";
      if (isWindows) {
        processPath = rootDir + "Windows/explorer.exe";
    var url = "http://www.adobe.com";
    window.cep.process.createProcess(processPath, url);
    Apologies for this inconvenience but we promise to keep you informed when openURLInDefaultBrowser API is fully supported.
    Kind regards,
    Lea

  • Firefox is set as the default browser, but if I click a link in MS Word, the link is opened with MS Internet explorer. Why?

    Firefox is set as the default browser, but if I click a link in MS Word, the link is opened with MS Internet explorer. Why?

    What version of Windows and Office is it? I had this issue with an older version of office and Windows XP. Basically, MS are using their browser (IE) because it's their software (MS Office). If you go to options in MS word though, you should be able to find an option to set the default browser to open links.

  • The default browser is set to 5.0. I want it to open 4.0.

    I just installed the Firefox 5.0 update. I currently have 3.6, 4.0 and 5.0 installed on my Mac Book Pro for development purposes. Many plug-ins I use for development don't work in 5.0 currently so I want to use 4.0 instead. How can I make my default browser 4.0?
    Currently, 5.0 keeps automatically opening when I click on a link from an external source/RSS reader.

    I am not a Mac user, but have multiple versions and profiles of Firefox. I note you ask about Macs, but have system details showing as Windows 7.
    I can only speak from a PC perspective, but no doubt you can sort it out yourself. It is down to the OS which browser is the default, although firefox has the option to check and reset that at startup.
    No doubt if I delved into the registry I could find how it sets the default browser, but in practical terms what I do is allow the OS to set itself up.
    # Choose any other alternative browser such as IE, make that the default, and allow that to take effect.
    #Then deselect IE as default browser checking.
    #Now start up the chosen version of Firefox, use Firefox's options to set that as default browser. (Options -> advanced -> general system defaults )
    It works, although some applications may choose IE regardless.
    *You may be interested in http://kb.mozillazine.org/Default_browser
    With luck something similar may work on a Mac

  • Opening a byte stream of HTML content in the default browser

    Hi,
    I have a ByteArrayOutputStream which holds HTML content. Can anybody tell me how to open it in the default browser with out saving the content to a file?
    Thanks and regards
    Unni

    Weeeeeelllll. You could implement your own mini http server, then launch the browser pointing to localhost....
    Some browsers have automation interfaces that you could technically use to do something like this, but you are way outside the realm of Java land at that point.
    If your code is running as an Applet, there may be some sort of interface that allows you to do this (it's been so long since I messed with applets that I can't really say - my initial inclination is to think "probably not", as this could violate the security sandbox... but who knows).
    - K

  • I have Google as my default home page in Firefox and the Google proser opens when I start Firefox, but every time I open a new tab it opens the Yahoo browser.

    I have Google as my default home page in Firefox and the Google browser opens when I start Firefox, but every time I open a new tab it opens the Yahoo browser.

    Do you have the FastStart extension?
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem.
    *Switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance
    *Do NOT click the Reset button on the Safe Mode start window
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • I have Google as my default home page in Firefox and the Google browser opens when I start Firefox, but every time I open a new tab it opens the Yahoo browser.

    I have Google as my default home page in Firefox and the Google browser opens when I start Firefox, but every time I open a new tab it opens the Yahoo browser.

    Do you have the FastStart extension?
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem.
    *Switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance
    *Do NOT click the Reset button on the Safe Mode start window
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • Outlook keeps opening links in Internet Explorer, regardless of Firefox being the default browser

    I have Firefox 4.0.1 running on a Windows 7, 64-bit computer. I have Internet Explorer 9.0.8112.16421 installed as well.
    I use Outlook here at work and have Outlook version 14.0.5128.5000 installed, which is part of Microsoft Office Home and Business 2010.
    I have tried to set Firefox as the default browser on the computer. When I go to Start->Default programs, Firefox is set to default. When I open Firefox and check in settings, it says it is currently the default browser. I have tried to set IE as the default, then switch back to Firefox etc. But still regardless of this, Outlook opens all links in emails in Internet Explorer.
    It is very annoying as IE is a lot slower than Firefox, especially when I already have Firefox runnint and Outlook needs to start a new session of IE every time I open a link.
    Does anyone know how I can force Outlook to open links in Firefox when Firefox is already the default browser on the computer but Outlook still opens links in IE?

    I have the same problem (roughly) - I have PDF hyperlinks in an Excel spreadsheet and, when clicked, instead of them opening directly in Acrobat (or via Firefox, my default browser), they open via IE. Regular HTML links in the Excel spreadsheet open in Firefox.
    I have enabled the '''Block PDF files' access to all web sites''' option under ''Trust Manager'' category in the Adobe Reader ''Preferences'' tab.
    I have also disabled the '''Adobe PDF Link Helper''' Extension in the ''Manage Add-ons'' tab in IE.
    Obviously, neither of these settings made any difference.
    * Windows XP Pro SP3
    * Microsoft Office Excel 2003 SP3
    * Internet Explorer 8.0
    * Adobe Reader X (Version 10.1.1)
    * Firefox 8.0

  • If Firefox is not the default browser is there anyway to create an "Open with Firefox" right click option for internet icons on the desktop??

    When internet icons on the desktop are right clicked and Firefox is not the default browser, is there anyway to create an "Open with Firefox" option in the right click menu? If not you should create one in future versions.

    You will have to create a copy of the Firefox desktop shortcut and add the URL to the target line if you want to open such an internet shortcut with Firefox.
    A normal internet shortcut will always open in the default browser.

  • When I click a link in email client (apple mail), it does not open in firefox. I have checked both Firefox and Safari and Firefox is the default browser.

    When clicking a link in either apple mail or even from a word document, nothing happens.

    Try to redo the default browser and make another browser like Safari the default and then let Firefox do it again.
    See:
    * [[How to make Firefox the default browser]]
    * [[Setting Firefox as the default browser does not work]]
    * http://kb.mozillazine.org/Default_browser

  • Everytime i open the firefox browser i get a message in the task bar that an attempt is being made by another to modify the site. How do I fix the problem?

    firefox is the default browser in my PC. Every time i open firefox browser a notification appears in the right hand bottom of the screen with the attempt at modification message. It just flashes on and then off. I have clicked on the settings button in the warning message and confirmed the keep the current screen option. But, it keeps appearing. Help?

    Hello MrNeuf,
    I would recommend releasing and renewing the IP lease on the affected computer. The following article provides further information and details the process of doing so.
    Mac OS: How to release and renew a DHCP lease
    http://support.apple.com/kb/TS1920
    Cheers,
    Allen

  • How do I make Firefox the default browser in a non-administrative Windows XP account, where clicking to do so has no effect?

    I have two accounts for myself on my PC running Windows XP. In the administrative account, Firefox is already the default browser that opens when I double-click an HTML file, etc. Firefox knows it's the default browser there.
    In my other account, every time I start Firefox, it tells me it's not the default browser. Clicking there to make it the default, or in the options, does nothing.
    When I go to Set Program Access and Defaults in the administrative account, "Use my current Web browser" is selected. Mozilla Firefox is not listed as an option. In my non-administrative account, the Add or Remove Programs control panel can't be used. It says I don't have permission.

    To check that in the other account you would have to give it temporarily administrator permissions.
    See:
    *https://support.mozilla.org/kb/How+to+make+Firefox+the+default+browser
    *https://support.mozilla.org/kb/Setting+Firefox+as+the+default+browser+does+not+work
    *http://kb.mozillazine.org/Default_browser

  • How to change the default browser for "Search in Google" pop-up menu?

    This issue has come up for the last three OS X releases, at least, and it's still here for Lion.
    I'm in Apple Mail and select some text. I want to search on the term using Google. Right-click brings up the context menu with "Search in Google." This inevitably results in Safari opening for the search.
    Chrome is definitely set as my default browser. Clicking links in email messages brings them up in the proper browser. "Search in Google" does not. Wherever this context menu item is selected (Mail, TextEdit, etc.) it opens Safari instead of the default browser.
    As far as I'm concerned, that makes the context menu item useless, since I do not use Safari.
    Has anyone figured out a workaround?
    Has anyone in the OS X team at Apple paid attention to this issue? It is not new.

    This post helped me.
    https://code.google.com/p/chromium/issues/detail?id=147510
    Basically, the "Search in Google" extension is from Safari and it can be disabled in System Preferences.
    System Preferences -> Keyboard -> Keyboard Shortcuts -> Services -> Searching and unchecking "Search with Google"
    It worked for me and I also disabled a few other right-click options that I never use.

  • How do I set firefox as the default browser in Windows Server 2012 Group Policy Editor?

    Hello, I am unable to set firefox as the default browser despite multiple different attempts to do so using group policy.
    I have:
    - Set a registry command (targeted at 32/64 via a WMI query) to reset the opening command as shown below:
    HKEY_CURRENT_USER\Software\Classes\http\shell\open\command
    "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -osint -url "%1"
    - Set a powershell logon script to run (that does run):
    firefox.exe -silent -setDefaultBrowser
    Despite setting the above it seems the client computers browsers are not affected by the settings above. When the script runs or if I run the command above a UAC window pops up and requests that I accept the command (for the setDefaultBrowser) but even if I click yes as an administrator it does nothing.
    Since GPO in 2012 has changed perhaps there is something that I am missing? Do I need to somehow disable Windows Internet Explorer from achieving default browser status?
    Please do not reply if you will suggest that I use Internet Explorer Maintenance (since this function in GPO has been disabled since IE10)
    My DC is Server 2012, my client computers are Win7 32/64.

    The above reply does not take into account that I am trying to use GROUP POLICY EDITOR to make it the default browser.

Maybe you are looking for

  • How do I re-install my address book application?

    While trying to import my contacts from my Hotmail account, I melted my Address Book application and had to send it to the trash. How do I re-install it? Can I re-install it? Do I have to re-install the whole operating system? Please help, I'm trying

  • 'Content viewing' in 'Audit Log reports' throws timout error

    I have enabled 'Reports' in the site collection features and I am tryin gto generate the 'Content viewing' in 'Audit Log reports'. This keeps me waiting for a couple of minutes and throws a timeout error. Could you please let me know why is this happ

  • Can't post a gallery picture to Twitter

    I'm not able to post pictures from my Gallery to Twitter using the Twitter app. I click the photo button from the tweet composition screen, select "Gallery," select the photo I want and it switches to the Crop function and gets hung up. I can (someti

  • Resynchronize?????

    Hi, one question, i synchronized contacts at my 6500 slide but someone did his phone to before me and all his and my contacts are all together and i want to delete his contacts, how do i remake it?thx

  • Runtime Error After Installing Quick Time 7.2 Without Itunes Option

    First I could not open my Itunes b/c I had an application error. So I uninstalled Quick Time and reinstalled Quick Time 7.2 (w/o Itunes). Now I have a "Runtime Error: This Application has requested the Runtime to terminate it in an unusual way. Pleas