In my current project, I need to compile few classes, provided by client. I am using maven-embedder to invoke the programmatic compilation of new client classes. The .class files of the new classes gets generated in the target folder in the first call. But then I am not able to get the class through Class.forName("fully.qualified.class.name")
in the same call. It gives a ClassNotFoundException.
However in the next call, it runs successfully and all the properties of the new class is available through reflection. Why reflection fails in the first call?
Aucun commentaire:
Enregistrer un commentaire