I need to scan class or jar file that implements or extend a specific class.
It’s the same mechanism that Eclipse use to scan the plugin presence.
There is a way to do this ?
I need to scan class or jar file that implements or extend a specific
Share
From exmaple depot: How to load a Class that is not on the classpath:
List the files in the directory if necessary, using
File.list().When the class is loaded, you can check if it implements a specific interface by doing
clazz.isInstance. From the docs:To load classes from a jar-file:
How to load a jar file at runtime
To list files in a jar file:
JarFile.entries().