Tagged articles
10 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
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