Changeset 7cae467


Ignore:
Timestamp:
Jan 12, 2017 3:54:06 PM (4 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
a36083a
Parents:
2df64cd
Message:

DTG: Don't try to start if headless (ticket #1924)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • apps/routerconsole/java/src/net/i2p/router/web/RouterConsoleRunner.java

    r2df64cd r7cae467  
    274274        // if no permissions, don't even try
    275275        // isLaunchedAsService() always returns true on Linux
    276         if (SystemVersion.isLinuxService() ||
     276        if (GraphicsEnvironment.isHeadless() || SystemVersion.isLinuxService() ||
    277277            (SystemVersion.isWindows() && _context.hasWrapper() && WrapperManager.isLaunchedAsService())) {
    278278            // required true for jrobin to work
     
    286286                                        (sdtg == null && SystemVersion.isWindows());
    287287            if (desktopguiEnabled) {
    288                 //Check if we are in a headless environment, set properties accordingly
    289                 System.setProperty("java.awt.headless", Boolean.toString(GraphicsEnvironment.isHeadless()));
     288                System.setProperty("java.awt.headless", "false");
    290289                net.i2p.desktopgui.Main dtg = new net.i2p.desktopgui.Main(_context, _mgr, null);   
    291290                dtg.startup();
Note: See TracChangeset for help on using the changeset viewer.