user3310334
user3310334

Reputation:

IllegalStateException: No language and polyglot implementation was found on the classpath. Make sure the truffle-api.jar is on the classpath

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?

Upvotes: 4

Views: 7811

Answers (2)

sparkyspider
sparkyspider

Reputation: 13529

implementation 'org.graalvm.sdk:graal-sdk:20.1.0'
implementation 'org.graalvm.truffle:truffle-api:20.1.0'
implementation 'org.graalvm.js:js:20.1.0'    

Upvotes: 4

user3310334
user3310334

Reputation:

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>

Upvotes: 10

Related Questions