Scanning for annotations is very difficult. You actually have to process all classpath locations and try to find files that correspond to Java classes (*.class).
I strongly suggest to use a framework that provides such functionality. You could for example have a look at Scannotation.