title: How to run a whole Java file added as a snippet in JShell?
body: <p>I tried installing JDK 9 Early access version 172 to play around with JShell. 
  When I tried to open a simple java file and execute it after adding it as a snippet, it just showed modified class Test and increased the snippet number. Can you please help me realize where I went wrong?</p>
  
  <pre><code>|  Welcome to JShell -- Version 9-ea
  |  For an introduction type: /help intro
  
  jshell&gt; /open G:\kavitha\Test.java
  
  jshell&gt; /list
  
     1 : public class Test{
          public static void main(String[] args){
                   int i = 1;
                   int j = 2;
               System.out.println("Sum of 1 and 2 is : " + (i+j));
          }
         }
  
  jshell&gt; /1
  public class Test{
          public static void main(String[] args){
                   int i = 1;
                   int j = 2;
               System.out.println("Sum of 1 and 2 is : " + (i+j));
          }
  }
  |  modified class Test
  
  jshell&gt; /list
  
     2 : public class Test{
          public static void main(String[] args){
                   int i = 1;
                   int j = 2;
               System.out.println("Sum of 1 and 2 is : " + (i+j));
          }
         }
  </code></pre>