# detect method

1. @override

Properties detect(

1. List<String> args

)
override

Detects the current system environment and returns a configured instance

`args` are the command-line arguments passed to the application Returns a fully configured Properties instance

## Implementation

    @override
    Properties detect(List<String> args) {
      final compilationMode = _detectCompilationMode();
      final entrypoint = io.Platform.script.toFilePath();
      final runningFromDill = entrypoint.endsWith('.dill');
      final runningAot = _isRunningAot();
      final runningJit = !runningAot;
      final launchCommand = _buildLaunchCommand();
      final ideRunning = _isIdeRunning();
      final watchModeEnabled = _isWatchModeEnabled(args);

      return SystemPropertiesBuilder()
        .compilationMode(compilationMode)
        .runningFromDill(runningFromDill)
        .runningAot(runningAot)
        .runningJit(runningJit)
        .entrypoint(entrypoint)
        .launchCommand(launchCommand)
        .ideRunning(ideRunning)
        .watchModeEnabled(watchModeEnabled)
        .build();
    }