title: How to compile and run Java code in Visual Studio Code
body: <p>I downloaded Visual Studio Code and installed the "<a href="https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-pack" rel="nofollow noreferrer">Java Extension Pack</a>" by Microsoft.</p>
  
  <p>Afterwards I downloaded the jdk1.8.0_161 and created the required environment variables as described in the "Java Extension Pack" documentation.</p>
  
  <p>I then created a new file with .java ending and wrote a simple "Hello World" test program.</p>
  
  <p>But how can I now compile and run the code?</p>