Fixed bug [ 1713032 ] ADempiere won't open browser in Mac OS X

This commit is contained in:
fer_luck 2007-05-04 20:10:58 +00:00
parent f4c872749c
commit c8f66784fc
1 changed files with 9 additions and 3 deletions

View File

@ -45,9 +45,11 @@ public final class Env
{ {
/** Logging */ /** Logging */
private static CLogger s_log = CLogger.getCLogger(Env.class); private static CLogger s_log = CLogger.getCLogger(Env.class);
private static String UNIX_BROWSER = "netscape"; private static String UNIX_BROWSER = "netscape";
private static String MAC_BROWSER = "open";
/** /**
* Exit System * Exit System
* @param status System exit status (usually 0 for no error) * @param status System exit status (usually 0 for no error)
@ -1361,8 +1363,12 @@ public final class Env
s_log.info(url); s_log.info(url);
// OS command // OS command
String cmd = "rundll32 url.dll,FileProtocolHandler "; String cmd = "rundll32 url.dll,FileProtocolHandler ";
if (!isWindows()) if (!isWindows()){
cmd = UNIX_BROWSER + " "; if(isMac())
cmd = MAC_BROWSER + " ";
else
cmd = UNIX_BROWSER + " ";
}
// //
String execute = cmd + url; String execute = cmd + url;
try try