How to Use WatchService in Java to Watch a Directory
Build a folder watcher in Java 21 with WatchService. It copes with half-written files, duplicate events and overflow, and ships with 23 passing checks.
Build a folder watcher in Java 21 with WatchService. It copes with half-written files, duplicate events and overflow, and ships with 23 passing checks.
Build a small CSV reader and writer in plain Java 21 that handles quoted commas, line breaks and BOMs, then use it on a currency rates file. No dependencies.
Build a parcel scan log in Java 21 with NIO.2: append, stream, atomically replace and archive files, plus 20 checks and the errors I hit on purpose.
How to read environment variables and system properties in Java 21: one Settings class, a clear precedence rule, typed values, masked secrets and 16 checks.
How to use ProcessBuilder in Java 21: run a command, read stdout and stderr, feed stdin, set a timeout and kill a stuck child, with 14 checks and 5 traps.