title: How to get Graal SDK packages to work without Maven?
body: <p>I am developing a Java application that needs to execute
  JavaScript. Nashorn JS engine is about to get deprecated
  and the replacement is the set of APIs provided by Graal SDK
  which makes use of GraalVM. The virtual machine that essentially
  executes a number of languages.</p>
  
  <p>At least that is what I think.
  So I spent a day trying to get it working. I downloaded GraalVM rc6 that uses JDK 8. I use IntelliJ IDEA and I added GraalVM as a new JDK. I found it strange that I am supposed to add a virtual machine as a development kit, but I knew it is based on JDK 8 so I was ok with it.</p>
  
  <p>And the problem was unlike others, I could not get the new packages to work. My IDE told me it cannot resolve them.</p>
  
  <p>Actually, none of the org.graalvm packages could be resolved.</p>
  
  <p>So I downloaded JDK 11 build 28 because as far as I know JDK 11 comes with GraalVM since build 20.</p>
  
  <p>Actually, in this case, some of the packages could be found, but far less than expected: for instance org.graalvm.polyglot still could not be resolved.</p>
  
  <p>Finally, I tried adding Graal SDK from Maven and the packages were resolved. Now I get an exception when running:</p>
  
  <pre><code>Context ctx = Context.create(“js”);
  </code></pre>
  
  <p>No language and polyglot implementation were found on the classpath. Make sure the truffle-api.jar is on the classpath.</p>
  
  <p>I thought the problem in the first 2 cases was actually not acquiring GraalVM JDK, but it throws the exception even this way.</p>
  
  <p>Can someone experienced explain the matter?</p>