Class ToolkitEnvironment

The development environment toolkit provides a knowledge base and an interpreter that is instrumented for debugging. This class implements the singleton pattern. There is only one instance per Java class loader.

The class can be used to execute the development environment either with or without a graphical interface. For this purpose the main() method of the class can be statically called. The method will setup a knowledgebase and an interpreter, and then enter a query answer loop. When started without a graphical interface, the method will also install a ^C interrupt handler for the duration of the interactive session.

The Android version of the class ToolkitEnvironment does not provide a main() method and does not declare the constants for the command line options in its ToolkitLibrary class. Otherwise the class ToolkitEnvironment is identical to the Swing version.

Specific to the development environment is the command line option "-d". On the Swing platform, when a graphical user interface is used, this can be used to override the settings in the graphical user interface. The legal values for this flag are -1 for no thread monitor, 0 for a dy-namic port of the thread monitor and a non-zero value for a static port.

The main() method for the Swing version recognizes the following options:

Don't create graphical user interface.
-v <level>:
Specify the console verbosity. The default value is “summary”.
-a <path>,...:
Add the paths <path>,....
-e <capability>,...:
Add the capabilities <capability>,....
-b <goal>:
Use <goal> as the console banner. The default value is “welcome”.
-t <goal>:
Use <goal> as the console top level. The default value is “prolog”.
-d <port>:
Use <port> as the server port for the thread monitor.
package jekdev.platform.headless;


public final class ToolkitEnvironment extends Toolkit {
public static final ToolkitEnvironment DEFAULT;

public final static String OPTION_DEBUG = "-d";

public final static String PROP_SYS_MONITOR_CONFIG
= "sys_monitor_config";
public final static String PROP_SYS_MONITOR_RUNNING
= "sys_monitor_running";

public static void main(String[] args);