Issue
IllegalStateException: No language and polyglot implementation was found on the classpath. Make sure the truffle-api.jar is on the classpath.
I wanted to use GraalVM in my Java project.
I added this dependency to my pom.xml
<dependency>
<groupId>org.graalvm.js</groupId>
<artifactId>js-scriptengine</artifactId>
<version>1.0.0-rc10</version>
</dependency>
but apparently that's not enough.
What else do I have to do to fix this error?
Solution
Had to add all these dependencies:
<dependency>
<groupId>org.graalvm.js</groupId>
<artifactId>js</artifactId>
<version>1.0.0-rc10</version>
</dependency>
<dependency>
<groupId>org.graalvm.js</groupId>
<artifactId>js-scriptengine</artifactId>
<version>1.0.0-rc10</version>
</dependency>
<dependency>
<groupId>org.graalvm.truffle</groupId>
<artifactId>truffle-api</artifactId>
<version>1.0.0-rc10</version>
</dependency>
Answered By - theonlygusti
Answer Checked By - Candace Johnson (JavaFixing Volunteer)