* back from the inherently platform-sensitive concept of a default browser and simply attempts
* to launch Netscape via a shell command.
* <p>
- * This code is Copyright 1999-2001 by Eric Albert (ejalbert@cs.stanford.edu) and may be
+ * This code is Copyright 1999-2001 by Eric Albert (ejalbert\@cs.stanford.edu) and may be
* redistributed or modified in any form without restrictions as long as the portion of this
* comment from this paragraph through the end of the comment is not removed. The author
* requests that he be notified of any application, applet, or other binary that makes use of
/** The com.apple.MacOS.AEDesc class */
private static Class aeDescClass;
- /** The <init>(int) method of com.apple.MacOS.AETarget */
+ /** The <init>(int) method of com.apple.MacOS.AETarget */
private static Constructor aeTargetConstructor;
- /** The <init>(int, int, int) method of com.apple.MacOS.AppleEvent */
+ /** The <init>(int, int, int) method of com.apple.MacOS.AppleEvent */
private static Constructor appleEventConstructor;
- /** The <init>(String) method of com.apple.MacOS.AEDesc */
+ /** The <init>(String) method of com.apple.MacOS.AEDesc */
private static Constructor aeDescConstructor;
/** The findFolder method of com.apple.mrj.MRJFileUtils */
*/
private static final String NETSCAPE_REMOTE_PARAMETER = "-remote";
private static final String NETSCAPE_OPEN_PARAMETER_START = "openURL(";
+ private static final String NETSCAPE_OPEN_NEW_WINDOW = ", new-window";
private static final String NETSCAPE_OPEN_PARAMETER_END = ")";
/**
break;
case OTHER:
default:
- browser = "netscape";
+ browser = jalview.bin.Cache.applicationProperties.getProperty("jalview.browser");
+ if (browser==null) {
+ // hope firefox exists :-/
+ browser = "firefox";
+ }
break;
}
return browser;
}
break;
case OTHER:
- // Assume that we're on Unix and that Netscape is installed
+ // Assume that we're on Unix and that Netscape (actually Firefox) is installed
// First, attempt to open the URL in a currently running session of Netscape
process = Runtime.getRuntime().exec(new String[] { (String) browser,
NETSCAPE_REMOTE_PARAMETER,
NETSCAPE_OPEN_PARAMETER_START +
url +
+ NETSCAPE_OPEN_NEW_WINDOW +
NETSCAPE_OPEN_PARAMETER_END });
try {
int exitCode = process.waitFor();