title: Maven can't find sun.jvm.hotspot when compiling
body: <p>I'm trying to use sum.jvm tools in my Java program. It allows me to program using sun.jvm.* but it when i try to compile it (clean, install) i get this:</p>
  
  <pre><code>error: package sun.jvm.hotspot.memory does not exist
  </code></pre>
  
  <p>Basically a ton of these errors for wherever i used a sun.jvm reference.</p>
  
  <p>I've looked around a lot and i can't see to find anyone else with this problem so far... Does anyone know a fix to this?</p>
  
  <p>I'm trying to create a Tools subclass that scans the JVM for certain strings, i found out i need to use sun.jvm, but now it wont work. </p>
  
  <p>This is my method:</p>
  
  <pre><code>@Override
  public void run() {
      SystemDictionary dict = VM.getVM().getSystemDictionary();
      InstanceKlass stringKlass = (InstanceKlass) dict.find("java/lang/String", null, null);
      OopField valueField = (OopField) stringKlass.findField("value", "[C");
  
      long[] stats = new long[2];
      VM.getVM().getStringTable().stringsDo(s -&gt; {
          s.printValueOn(System.out);
          System.out.println();
          stats[0]++;
          stats[1] += s.getObjectSize() + valueField.getValue(s).getObjectSize();
      });
  }
  </code></pre>
  
  <p>That i'm using to test in the Tools subclass. Anywhere in my project that i reference sun.jvm it gives that error when i try to do a clean install with Maven. It builds with IntelliJ's built in compiler, but not Maven.</p>
  
  <p>I've also tried to re-import Maven, and even re-install IntelliJ and compile it with a fresh install.</p>
  
  <p>It happens with all sun.jvm.hotspot.* paths.</p>
  
  <p>Thanks,
  Erouax</p>