I checked in code this week that moves the threading inside the library code. This will greatly reduce the complexity of the api. Now, you can make a thread-safe call using the following:
BrowserLauncher launcher = new BrowserLauncher();
launcher.openURLinBrowser("http://www.google.com");
Users should still cache the launcher instance but now they won't have to fiddle with threads. The BrowserLauncherRunner class is not package protected so it will no longer be accessible outside the library.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I checked in code today that moves the configuration for linux/unix, SunOS, and Windows into property files. This will make it easier to add new browsers and allowed us to remove several classes from the Windows implementation.
# windows versions and arguments for launching a browser
# command for starting default browser | command for starting a specific browser
windows.win2000=cmd.exe /c start "" "<url>";cmd.exe /c start <browser> "<url>"
windows.win9x=command.com /c start "<url>";command.com /c start <browser> "<url>"
windows.winNT=cmd.exe /c start "" "<url>";cmd.exe /c start <browser> "<url>"
# list of browsers and arguments for using them
# browser display name | browser exe name
browser.mozilla=Mozilla;mozilla
browser.netscape=Netscape;netscape
browser.firefox=FireFox;firefox
browser.opera=Opera;opera
browser.ie=IE;iexplore
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I checked in code this week that moves the threading inside the library code. This will greatly reduce the complexity of the api. Now, you can make a thread-safe call using the following:
BrowserLauncher launcher = new BrowserLauncher();
launcher.openURLinBrowser("http://www.google.com");
Users should still cache the launcher instance but now they won't have to fiddle with threads. The BrowserLauncherRunner class is not package protected so it will no longer be accessible outside the library.
I checked in code today that moves the configuration for linux/unix, SunOS, and Windows into property files. This will make it easier to add new browsers and allowed us to remove several classes from the Windows implementation.
Here are the config files:
# $Id: linuxUnixConfig.properties,v 1.1 2006/03/23 20:27:30 jchapman0 Exp $
# delimiter for browser listing
delimchar=;
# list of browsers and arguments for using them
# display name | executable name | start browser args | invoke already started browser
browser.mozilla=Mozilla;mozilla;<browser> <url>;<browser> -remote openURL(<url>)
browser.netscape=Netscape;netscape;<browser> <url>;<browser> -remote openURL(<url>)
browser.firefox=FireFox;firefox;<browser> <url>;<browser> -remote openURL(<url>)
browser.mozilla-firefox=FireFox;mozilla-firefox;<browser> <url>;<browser> -remote openURL(<url>)
browser.konqueror=Konqueror;konqueror;<browser> <url>;<browser> -remote openURL(<url>)
browser.opera=Opera;opera;<browser> <url>;<browser> -remote openURL(<url>)
# $Id: sunOSConfig.properties,v 1.1 2006/03/23 20:27:31 jchapman0 Exp $
# delimiter for browser listing
delimchar=;
# list of browsers and arguments for using them
# display name | executable name | start browser args | invoke already started browser
browser.sdtwebclient=Default;sdtwebclient;<browser> <url>;<browser> -remote openURL(<url>)
browser.mozilla=Mozilla;mozilla;<browser> <url>;<browser> -remote openURL(<url>)
browser.netscape=Netscape;netscape;<browser> <url>;<browser> -remote openURL(<url>)
browser.firefox=FireFox;firefox;<browser> <url>;<browser> -remote openURL(<url>)
browser.opera=Opera;opera;<browser> <url>;<browser> -remote openURL(<url>)
# $Id: windowsConfig.properties,v 1.1 2006/03/23 20:27:31 jchapman0 Exp $
# delimiter for browser listing
delimchar=;
# windows versions and arguments for launching a browser
# command for starting default browser | command for starting a specific browser
windows.win2000=cmd.exe /c start "" "<url>";cmd.exe /c start <browser> "<url>"
windows.win9x=command.com /c start "<url>";command.com /c start <browser> "<url>"
windows.winNT=cmd.exe /c start "" "<url>";cmd.exe /c start <browser> "<url>"
# list of browsers and arguments for using them
# browser display name | browser exe name
browser.mozilla=Mozilla;mozilla
browser.netscape=Netscape;netscape
browser.firefox=FireFox;firefox
browser.opera=Opera;opera
browser.ie=IE;iexplore