Tagged articles
5 articles
Page 1 of 1
Code Ape Tech Column
Code Ape Tech Column
Dec 6, 2022 · Backend Development

File Change Monitoring in Java: WatchService, JDK Bug, and Inotify

This article examines Java file change monitoring, explains the limitations of a simple timestamp‑polling approach, details a JDK bug that loses millisecond precision, explores the built‑in WatchService and its fallback to polling, and demonstrates how Linux inotify provides a more reliable solution.

Backend DevelopmentFile MonitoringJDK bug
0 likes · 9 min read
File Change Monitoring in Java: WatchService, JDK Bug, and Inotify
Senior Brother's Insights
Senior Brother's Insights
May 29, 2022 · Backend Development

Three Java Ways to Dynamically Monitor File Changes: Polling, WatchService, and Commons‑IO

To handle dynamic file changes such as rule updates, configuration reloads, or log monitoring, this article compares three Java approaches—simple polling with File#lastModified, the OS‑integrated WatchService API, and the Apache Commons‑IO monitor—detailing their implementations, advantages, drawbacks, and practical usage tips.

BackendCommons-IOFile Monitoring
0 likes · 12 min read
Three Java Ways to Dynamically Monitor File Changes: Polling, WatchService, and Commons‑IO
Su San Talks Tech
Su San Talks Tech
May 11, 2022 · Backend Development

Why Java’s WatchService Misses File Changes and How to Fix It

This article examines a JDK bug that drops millisecond precision in file timestamps, explains why Java’s WatchService falls back to polling on macOS, contrasts it with Linux’s inotify‑based implementation, and shares practical workarounds for reliable file change detection.

Backend DevelopmentFile MonitoringJava
0 likes · 10 min read
Why Java’s WatchService Misses File Changes and How to Fix It
Xiao Lou's Tech Notes
Xiao Lou's Tech Notes
May 10, 2022 · Backend Development

Why Java’s WatchService Misses File Changes and How to Fix It

An in‑depth look at a real‑world file‑watching failure caused by a JDK timestamp bug, exploring Java’s WatchService implementation, its reliance on polling versus Linux’s inotify, and practical workarounds to ensure reliable configuration reloads across platforms.

File MonitoringJDK bugJava
0 likes · 10 min read
Why Java’s WatchService Misses File Changes and How to Fix It