title: GraalVM Polyglot can't load Java class
body: <p>Want migrate from Nashorn to GraalVM. Installed Graal VM CE</p>
  
  <pre><code>openjdk version "11.0.5" 2019-10-15
  OpenJDK Runtime Environment (build 11.0.5+10-jvmci-19.3-b05-LTS)
  OpenJDK 64-Bit GraalVM CE 19.3.0 (build 11.0.5+10-jvmci-19.3-b05-LTS, mixed mode, sharing)
  </code></pre>
  
  <p>Test app</p>
  
  <pre><code>import org.graalvm.polyglot.Context;
  import org.graalvm.polyglot.HostAccess;
  
  public class Main {
      public static void main(String[] args) {
          Context context = Context.newBuilder("js").allowHostAccess(HostAccess.ALL).build();
          context.eval("js", "var FileClass = Java.type(\"java.io.File\");");
      }
  }
  </code></pre>
  
  <p>Exception:</p>
  
  <pre><code>Exception in thread "main" ReferenceError: Java is not defined
      at &lt;js&gt; :program(Unnamed:1:16-19)
      at org.graalvm.sdk/org.graalvm.polyglot.Context.eval(Context.java:370)
      at task.Main.main(Main.java:9)
  </code></pre>
  
  <p>What's wrong?</p>