I\'m trying to compile and load a class at runtime, without knowing the package of the class. I do know that the class should comply with an interface, and the location of t
It seems likely that the compiler.run() is running externally and needs the class path to be set. Have you tried to pass it a suitable class path setting using the last parameter args to the run() call? Perhaps that's why ToolProvider.getSystemToolClassLoader().
This stackoverflow post might also help you.