Changeset 587dd30


Ignore:
Timestamp:
Jan 20, 2011 5:10:30 PM (9 years ago)
Author:
mathiasdm <mathiasdm@…>
Branches:
master
Children:
232ba56, cf1cf9e7
Parents:
84d8683
Message:
  • Added version check needed before starting desktopgui.
  • Added correct 'stop I2P' functionality in desktopgui.
Location:
apps
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • apps/desktopgui/src/net/i2p/desktopgui/router/RouterManager.java

    r84d8683 r587dd30  
    22
    33import java.io.IOException;
     4
     5import org.tanukisoftware.wrapper.WrapperManager;
    46
    57import net.i2p.I2PAppContext;
     
    7577        public static void shutDown() {
    7678                if(inI2P()) {
    77                         getRouter().shutdown(0);
     79                        Thread t = new Thread(new Runnable() {
     80
     81                                @Override
     82                                public void run() {
     83                                        WrapperManager.signalStopped(Router.EXIT_HARD);
     84                                }
     85                               
     86                        });
     87                        t.start();
     88                        getRouter().shutdown(Router.EXIT_HARD);
    7889                }
    7990    }
  • apps/routerconsole/java/src/net/i2p/router/web/RouterConsoleRunner.java

    r84d8683 r587dd30  
    2020import net.i2p.util.SecureFileOutputStream;
    2121import net.i2p.util.ShellCommand;
     22import net.i2p.util.VersionComparator;
    2223
    2324import org.mortbay.http.DigestAuthenticator;
     
    304305                //TODO: move away from routerconsole into a separate application.
    305306                //ApplicationManager?
    306             String[] args = new String[0];
    307             net.i2p.desktopgui.Main.beginStartup(args);
     307                VersionComparator v = new VersionComparator();
     308                if(v.compare(System.getProperty("java.runtime.version"), "1.6") >= 0) {
     309                String[] args = new String[0];
     310                net.i2p.desktopgui.Main.beginStartup(args);     
     311                }
    308312        } catch (Throwable t) {
    309313            t.printStackTrace();
Note: See TracChangeset for help on using the changeset viewer.