@Override
        public void run() {
            File currentDir = new File("D:\\path");

            while (true) {
                File[] images = currentDir.listFiles(new FileFilter() {

                    @Override
                    public boolean accept(File file) {
                        if (file.isFile() && file.getName().endsWith(".jpg")) {
                            return true;
                        }
                        return false;
                    }
                });
                for (File i : images) {
                    boolean found = false;
                    for (File j : imageQueue) {
                        if (i.getAbsolutePath().equals(j.getAbsolutePath())
                                && count != 0) {
                            found = true;
                        }
                    }

                    if (!found) {
                        System.out.println(String.format(
                                "Found image %s, added to queue.",
                                i.getAbsolutePath()));
                        imageQueue.add(i);
                    }
                }

                try {
                    Thread.sleep(1000);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }

                count++;
            }
        }