How to get Graal SDK packages to work without Maven?

后端 未结 5 1051
夕颜
夕颜 2021-02-06 04:55

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 wh

5条回答
  •  再見小時候
    2021-02-06 05:25

    IntelliJ is not adding all of the Jars from the Graal SDK to your classpath.

    You can add the Jars to your classpath inside IntelliJ by navigating to

    File > Project Structure > SDKs > Choose your Graal SDK
    

    Then click the + button at the bottom to add the Jar files. Adding the graal-sdk.jar will fix the problem with finding the org.graalvm package.

    This will avoid having to modify your pom.xml file to fix a problem with the IDE.

提交回复
热议问题