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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
Try the new release (rc2). I think the problem with Windows XP has been fixed.
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
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.
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.