Приложение мониторит директорию \watch
и при появлении в ней нового файла a.txt
, читает его.
File -> Project Structure -> Project Settings -> Modules -> Sources ->
Language level: 11
- Запустите приложение.
- Очистите директорию
\watch
. - Скопируйте файл
a.txt
в директорию\watch
. - Информация отобразится на консоли.