You can't use
Class c = Class.forName("C:\\A.txt");
on that way.
This piece of code returns Class by provided name, not the txt file.
Instead of this situation, you have to create class (suppose that is a class named A) and then retrieve Class A
over reflection with following code:
Class c = Class.forName("A");
Note that is a class, not a txt file.
---EDIT---
With this edit you are completely changed the question.
Based on the new (edited) question, you can't use reflection as you wrote:
t.v = 1;
You should use this code:
t.getClass().getField(v).set(t, 1);
That will solve your problem.