Created
February 9, 2012 13:01
-
-
Save mathieuancelin/1779849 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String myValue = "loser"; | |
Field f = MyClass.class.getDeclaredField("jerem"); | |
f.setAccessible(true); | |
f.set(null, myValue); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Error: could not access: java.lang.IllegalAccessException: Can not set static final int field VictimClass.USER_ID to java.lang.Integer