 <pre><code>public enum Logger { INSTANCE; DefaultFileMonitor fm = new DefaultFileMonitor(new CustomFileListener()); private FileObject file = null; private FileObject object = null; private Logger() { this.openFile(); try { FileSystemManager fsManager = VFS.getManager(); file = fsManager.resolveFile(this.getfileLocation()); object = fsManager.resolveFile("c:\test.txt"); } catch (FileSystemException e) { e.printStackTrace(); } fm.setDelay(1000); fm.addFile(file); fm.start(); } </code></pre> <p>Here is the code that I'm using to load the DefaultFileMonitor</p>