title: How do you analyze fatal -javaagent errors?
body: <p>I am trying to add a static method call to the java.lang.Object constructor using the java.lang.instrument API. I know I have the basics right because it works if I make the method call System.gc(). I verified this by running -verbosegc with and without the instrumentation. If I change the method call to a static class/method in my own package I get a fatal error:</p>
  
  <p><strong>Exception in thread "main" FATAL ERROR in native method: processing of -javaagent failed</strong></p>
  
  <p>No dump files are created in the working directory so I am finding it hard to figure out what's wrong. Other info:</p>
  
  <ul>
  <li>I ensure the static method class is loaded in the premain method before transformation</li>
  <li>The static method call does not result in creation of new objects</li>
  <li>The last class loaded is InterruptedIOException although I think that's just a side-effect</li>
  </ul>
  
  <p>Thanks in advance.</p>