another linux issue: openjdk6 comes in 'headless' mode as well, which throws if we attempt to contact the Desktop class, so make sure to warn the user nicely and avoid a nasty stacktrace printout

git-svn-id: http://google-refine.googlecode.com/svn/trunk@420 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
Stefano Mazzocchi 2010-04-08 03:43:26 +00:00
parent 2da0ec986d
commit b0d23a4a10

View File

@ -28,6 +28,7 @@ import org.mortbay.jetty.Connector;
import org.mortbay.jetty.Server;
import org.mortbay.jetty.bio.SocketConnector;
import org.mortbay.jetty.webapp.WebAppContext;
import org.mortbay.log.Log;
import org.mortbay.util.Scanner;
import com.metaweb.util.logging.IndentingLayout;
@ -106,8 +107,12 @@ public class Gridworks {
boolean headless = Configurations.getBoolean("gridworks.headless",false);
if (!headless) {
GridworksClient client = new GridworksClient();
client.init(host,port);
try {
GridworksClient client = new GridworksClient();
client.init(host,port);
} catch (Exception e) {
Log.warn("Sorry, some error prevented us from launching the browser for you.\n\n Point your browser to http://" + host + ":" + port + "/ to start using Gridworks.");
}
}
// hook up the signal handlers