Added the option to disable desktopgui.

This commit is contained in:
mathiasdm
2011-02-17 17:19:39 +00:00
parent ecadbba98e
commit ef50c122fc
7 changed files with 243 additions and 57 deletions

View File

@ -329,7 +329,9 @@ public class RouterConsoleRunner {
//TODO: move away from routerconsole into a separate application.
//ApplicationManager?
VersionComparator v = new VersionComparator();
if(v.compare(System.getProperty("java.runtime.version"), "1.6") >= 0) {
String desktopguiEnabled = I2PAppContext.getGlobalContext().getProperty("desktopgui.enabled");
int recentJava = v.compare(System.getProperty("java.runtime.version"), "1.6");
if(recentJava >= 0 && (desktopguiEnabled == null || desktopguiEnabled.equalsIgnoreCase("true"))) {
String[] args = new String[0];
net.i2p.desktopgui.Main.beginStartup(args);
}