Menu

When I try to launch, I get only a console...

Phil
2005-05-10
2013-04-30
  • Phil

    Phil - 2005-05-10

    Hi, I've just tried using BrowserLauncher2-10rc1.jar, but all I get when I try to launch the browser is a console window.
    I'm using java 1.4.2, Windoze XP Pro (SP1), Mozilla 1.7.7 (default browser).

    Here's a snippet of my code:

        private static void runBrowserHelp(BrowserLauncherErrorHandler errorHandler)
            throws BrowserLaunchingInitializingException, UnsupportedOperatingSystemException
        {
            BrowserLauncher launcher = new BrowserLauncher();
            BrowserLauncherRunner runner = new BrowserLauncherRunner(launcher, "file:///C:\\Help.html", errorHandler);
            Thread launcherThread = new Thread(runner);
            launcherThread.start();
        }

    I've tried urls like google.com, local files, etc, but all do the same thing. I get no exceptions.
    Is there something obvious I'm missing?
    Thanks, Phil

     
    • Jeff Chapman

      Jeff Chapman - 2005-05-19

      Try the new release (rc2). I think the problem with Windows XP has been fixed.

       
    • Nirav Shah

      Nirav Shah - 2005-07-27

      I don't believe this has been fixed in BrowserLauncher2-10rc2.jar.
      It seems to have problems launching from file:// URLs
      especially when there are special characters.

      Here is an example URL that does not work:

      file:/C:/Program%20Files/My%20Application%20Folder/help/index.html#<id=1>>java=true

       
    • Thomas Aglassinger

      Make sure  the URL you pass is actually valid.

      If you use file://..., try something like this:

      File file = new File("C:\\...");
      URL fileURL = file.toURL();

      It might be helpful to add a constructor where the "url" parameter is of class URL instead of String:

      BrowserLauncherRunner(BrowserLauncher launcher, URL url, BrowserLauncherErrorHandler errorHandler)

      Thomas.

       
    • Laird Nelson

      Laird Nelson - 2006-03-29

      Hello; I believe this is still an issue.  I am on Windows XP with Firefox as my default browser.  It occurs even when I'm using http:// as a prefix with a valid URL string as produced by the much-more-rigorous URI class.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.