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'