title: What is VMSystem in the Java class library?
body: <p>In my journey to understand programming languages/compilers, I thought it might be cool to try to write small versions of the Java class library.</p>
  <p>I decided to start with writing my own println() method. And no, not a method that simply calls println.</p>
  <p><strong>My Code so far:</strong></p>
  <pre><code>package maintest;
  
  import java.io.PrintStream;
  import gnu.classpath.SystemProperties;
  import gnu.classpath.VMStackWalker;
  
  public class JohnSystem {
  
      public static final PrintStream out = VMSystem.makeStandardOutputStream();
  
  }
  </code></pre>
  <p>So basically, I wrote a &quot;new&quot; System class. Now something funny I noticed about the OpenJDK system class. The <code>public static final</code> variable 'out' contained within <code>Java.lang.System</code> doesn't get instantiated in the way objects normally do with the new keyword. I tried to mimic the way it was done and wrote the code above accordingly.</p>
  <p>I figured <code>VMSystem</code> was another class in the class library which had a static method <code>makeStandardOutputStream()</code> which returned a <code>PrintStream</code> object.</p>
  <p>That would be fine except the compiler (or maybe eclipse?) doesn't recognize VMSystem and when I tried to import the packages I found at the OpenJDK, they are also not recognized.</p>
  <p>The code I'm referring to is at:  <a href="http://developer.classpath.org/doc/java/lang/System-source.html" rel="nofollow noreferrer">http://developer.classpath.org/doc/java/lang/System-source.html</a></p>
  <p>So, basically I'm trying to find out how to be able to use the VMSystem methods. Is there maybe a package I need to download? That doesn't really make sense though. Since <code>System.out.println()</code> works, then the packages must already be there no? Or is it perhaps a permissions/security issue?</p>
  <p>Thanks!</p>