A language with id xx is not installed. Installed languages are

本文详细解析了一个关于PolyglotEngine在尝试加载指定语言('sl')时遇到的IllegalArgumentException异常,并提供了相应的解决方案,包括如何正确配置JVM选项以确保语言包正确加载。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 

Exception in thread "main" java.lang.IllegalArgumentException: A language with id 'sl' is not installed. Installed languages are: [js].
	at com.oracle.truffle.polyglot.PolyglotEngineImpl.requirePublicLanguage(PolyglotEngineImpl.java:853)
	at com.oracle.truffle.polyglot.PolyglotContextImpl.requirePublicLanguage(PolyglotContextImpl.java:842)
	at com.oracle.truffle.polyglot.PolyglotContextImpl.eval(PolyglotContextImpl.java:813)
	at org.graalvm.polyglot.Context.eval(Context.java:344)
	at com.oracle.truffle.sl.launcher.SLMain.executeSource(SLMain.java:99)
	at com.oracle.truffle.sl.launcher.SLMain.main(SLMain.java:84)

Process finished with exit code 1

 

JVM选项添加

 

-XX:+UseJVMCICompiler
-Dtruffle.class.path.append=language/target/simplelanguage.jar

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值