Listing classes from a package

Hiah,

In my engine I am trying to get a list of classes within a package. I need this list because I need to create an instance of each class within the package to initialize it for later use.

For example, the list of instanceable classes is:

I need a way to get all of these classes by referencing the package name. I found this online:
https://pastebin.com/X5RYw32f

Usage:

Class<?>[] claz = ClassFinder.find("luaengine.type.object.insts");

This works perfectly, but only when running from eclipse. When I run from a jar, it cannot find any of the classes.

Not sure why a jar file yields different results? Could it be because it’s converting a URL to a File, then listing it’s sub-files?