IllegalStateException:在类路径上找不到语言和多语言实现。确保 truffle-api.jar 在类路径中

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.

我想在我的 Java 项目中使用 GraalVM。

我将此依赖项添加到我的 pom.xml

<dependency>
  <groupId>org.graalvm.js</groupId>
  <artifactId>js-scriptengine</artifactId>
  <version>1.0.0-rc10</version>
</dependency>

但显然这还不够。

我还需要做些什么来修复这个错误?

必须添加所有这些依赖项:

<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>
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'