I have a class with a private static final
field that, unfortunately, I need to change it at run-time.
Using reflection I get this error: java.lan
A little curiosity from the Java Language Specification, chapter 17, section 17.5.4 "Write-protected Fields":
Normally, a field that is final and static may not be modified. However, System.in, System.out, and System.err are static final fields that, for legacy reasons, must be allowed to be changed by the methods System.setIn, System.setOut, and System.setErr. We refer to these fields as being write-protected to distinguish them from ordinary final fields.
Source: http://docs.oracle.com/javase/specs/jls/se7/html/jls-17.html#jls-17.5.4