title: JDI - ObjectReference.setValue() on an inherited field
body: <p>I am using the JDI to debug a program. I am trying to change the value of a field in a certain ObjectReference. I have the Field object, as I can find it through     </p>
  
  <pre><code>ObjectReference.referencetype().allFields()
  </code></pre>
  
  <p>However, I cannot modify that field using </p>
  
  <pre><code>ObjectReference.setValue(Field paramField, Value paramValue)
  </code></pre>
  
  <p>since that only works on Fields inside this class or its direct superclass -- does not included higher classes up the hierarchy.</p>
  
  <p>Is it possible to change the value of a Field in a class higher than the direct super class?
  If so, I would appreciate any help to do so!</p>
  
  <p>Thank you,</p>
  
  <p>Dean</p>
  
  <p>EDIT: I am getting the following Error thrown at the line where I call ObjectReference.setValue():</p>
  
  <pre><code>Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
  at com.sun.tools.jdi.MirrorImpl.validateMirror(MirrorImpl.java:49)
  at com.sun.tools.jdi.ObjectReferenceImpl.setValue(ObjectReferenceImpl.java:214)
  </code></pre>