SecurityManager.checkAccess(ThreadGroup) is specified to be called for every Thread creation
and every ThreadGroup creation and is therefore jvm-independent. This can be used to get all
Threads associated with an application with good enough accuracy.
An application will be marked as using AWT if it gets associated with the AWT event queue thread.
To avoid unwanted side effects of accidental AWT initialization, TrapExit only tries to dispose
frames when an application is so marked. Only one AWT application is supported due to a lack of
a way to associate displayed windows with an application.
It is now used for consoleProject, run, and test. This loader verifies
that all classes loaded through it came from a particular classpath or
from the "root" loader. Root loader here is the launcher loader so that
those classes with native bindings come from that shared loader.
While this increases the verbosity level of `Fork.run()`, it remains
consistent with `Run.run()`. Switching between `fork := false` and
`fork := true` shouldn't change verbosity of log output.
- interrupts task execution only
- no further tasks scheduled
- existing tasks interrupted
- a task must terminate any other started threads when interrupted
- set cancelable to true to enable
- currently, 'run' properly terminates if the application properly
terminates when interrupted
- 'console' does not, 'test' depends on the test framework
- also bundled: set connectInput to true to connect standard input to forked run