title: Error: Exception thrown by the agent : java.lang.NullPointerException when starting Java application
body: <p>I am starting a Java application with the following command line arguments:</p>
  
  <pre><code>java -Dcom.sun.management.jmxremote.port=12312 \
       -Dcom.sun.management.jmxremote.rmi.port=12313 \
       -Dcom.sun.management.jmxremote.authenticate=false \
       Main
  </code></pre>
  
  <p>My program exits immediately and I get the following error:</p>
  
  <blockquote>
    <p>Error: Exception thrown by the agent : java.lang.NullPointerException</p>
  </blockquote>
  
  <p>I am using Java 8 update 45 on Windows 7:</p>
  
  <pre><code>java version "1.8.0_45"
  Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
  Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)
  </code></pre>