vendredi 1 juillet 2022

reflections.io Version 0.10.2 looking for a class works in IDE but not when running it as jar

Old way of using Reflections doesnt find classes when run from commandline (java -jar myapp.jar) anymore, despite being documented as still supported:

var reflections = new Reflections("com.package", Scanners.TypesAnnotated, Scanners.SubTypes);
Set<Class<?>> restBaseEnablingClasses = reflections.getTypesAnnotatedWith(MyAnnotation.class);

Still works in IDE (Intellij and Eclipse) though...

What could be the reason?





Aucun commentaire:

Enregistrer un commentaire