I have a tool we wrote internal to create patches for our application.
It checks in scm what classes were changed and compile them using javac.
Then we add the created jar to the classpath.
In the past we discovered that there is a problem with that:
If I changed method return type in class A, and class B uses that method then the class A signature changed and we get NoSuchMethodError when class B call that method.
However, now I have a different case that class static variables were changed and I get:
java.lang.NoClassDefFoundError: Could not initialize class.
Do you know what is causing this?
Is there any way to tell which classes I need to compile when a class was changed?
I have a tool we wrote internal to create patches for our application. It
Share
It sounds like a lot of effort to develop a solution I suspect is unreliable.
I would build the whole application, for every release. To create a patch, I would compare the class or file produced against that in the original distribution. Any files which have changed would be included.
This is better because