Here you can find the source of isInteractive()
true if there is a user you can ask for input. true by default. <p> This is set by the environment variable WINTERWELL_HEADLESS, with WINTERWELL_HEADLESS=true meaning interactive is false. See http://blog.plover.com/prog/sh-flags.html <p> If not set, it uses
public static boolean isInteractive()
//package com.java2s; //License from project: Open Source License import java.awt.GraphicsEnvironment; public class Main { /**//from w w w . jav a 2 s.c om * @return true if there is a user you can ask for input. true by * default. * <p> * This is set by the environment variable WINTERWELL_HEADLESS, with * WINTERWELL_HEADLESS=true meaning interactive is false. See * http://blog.plover.com/prog/sh-flags.html * <p> * If not set, it uses {@link GraphicsEnvironment#isHeadless()} */ public static boolean isInteractive() { String envVar = System.getProperty("WINTERWELL_HEADLESS"); if (envVar == null) return !GraphicsEnvironment.isHeadless(); return !envVar.toLowerCase().equals("true"); } }