英文:
JBang on OpenJ9
问题
我正在尝试在Eclipse/IBM JDK上运行最新的JBang版本0.102.0,但我遇到了这个错误。有什么建议吗?
C:\bin\jbang\bin>java -version
openjdk版本 "17.0.5" 2022-10-18
IBM Semeru Runtime Open Edition 17.0.5.0(构建17.0.5+8)
Eclipse OpenJ9 VM 17.0.5.0(构建openj9-0.35.0,JRE 17 Windows 11 amd64-64位压缩引用20221018_298(启用JIT,启用AOT)
OpenJ9 - e04a7f6c1
OMR - 85a21674f
JCL - 基于jdk-17.0.5+8的32d2c409a33)
C:\bin\jbang\bin>jbang.cmd
Errore: LinkageError durante il caricamento della classe principale dev.jbang.Main
java.lang.NoSuchFieldError: jdk/internal/loader/URLClassPath$JarLoader.csu
如果有任何问题,请随时提问。
英文:
I'm trying to run the latest JBang v0.102.0 on Eclipse/IBM JDK, but I get this error.
Any suggestions?
C:\bin\jbang\bin>java -version
openjdk version "17.0.5" 2022-10-18
IBM Semeru Runtime Open Edition 17.0.5.0 (build 17.0.5+8)
Eclipse OpenJ9 VM 17.0.5.0 (build openj9-0.35.0, JRE 17 Windows 11 amd64-64-Bit Compressed References 20221018_298 (JIT enabled, AOT enabled)
OpenJ9 - e04a7f6c1
OMR - 85a21674f
JCL - 32d2c409a33 based on jdk-17.0.5+8)
C:\bin\jbang\bin>jbang.cmd
Errore: LinkageError durante il caricamento della classe principale dev.jbang.Main
java.lang.NoSuchFieldError: jdk/internal/loader/URLClassPath$JarLoader.csu
答案1
得分: 1
你需要提供有关你的环境的更多细节;在我的环境中,使用相同的虚拟机是有效的:
C>java --version
openjdk 17.0.5 2022-10-18 IBM Semeru Runtime Open Edition 17.0.5.0 (build 17.0.5+8) Eclipse OpenJ9 VM 17.0.5.0 (build openj9-0.35.0, JRE 17 Windows 10 amd64-64-Bit Compressed References 20221018_298 (JIT enabled, AOT enabled) OpenJ9 - e04a7f6c1 OMR
- 85a21674f JCL - 32d2c409a33 based on jdk-17.0.5+8)
C>dir
Volume in drive C has no label. Volume Serial Number is 980D-DE8B
Directory of C:\cygwin\home\keithc\jbang-0.102.0\bin
80/02/01 00:00 <DIR> .
80/02/01 00:00 <DIR> ..
80/02/01 00:00 7,495 jbang
80/02/01 00:00 3,115 jbang.cmd
80/02/01 00:00 5,810,175 jbang.jar
80/02/01 00:00 7,737 jbang.ps1
4 File(s) 5,828,522 bytes
2 Dir(s) 269,905,985,536 bytes free
C>jbang.cmd --version
0.102.0
它还适用于我从源代码构建的JAR 文件:
C>java -cp jbang.jar dev.jbang.Main --version
0.102.0.7
英文:
You'll need to provide more details about your environment; using the same VM works for me:
C>java --version openjdk 17.0.5 2022-10-18 IBM Semeru Runtime Open Edition 17.0.5.0 (build 17.0.5+8) Eclipse OpenJ9 VM 17.0.5.0 (build openj9-0.35.0, JRE 17 Windows 10 amd64-64-Bit Compressed References 20221018_298 (JIT enabled, AOT enabled) OpenJ9 - e04a7f6c1 OMR
- 85a21674f JCL - 32d2c409a33 based on jdk-17.0.5+8)
C>dir Volume in drive C has no label. Volume Serial Number is 980D-DE8B
Directory of C:\cygwin\home\keithc\jbang-0.102.0\bin
80/02/01 00:00 <DIR> . 80/02/01 00:00 <DIR> .. 80/02/01 00:00 7,495 jbang 80/02/01 00:00 3,115 jbang.cmd 80/02/01 00:00 5,810,175 jbang.jar 80/02/01 00:00 7,737 jbang.ps1
4 File(s) 5,828,522 bytes
2 Dir(s) 269,905,985,536 bytes free
C>jbang.cmd --version
0.102.0
It also works with a jar I built from source:
C>java -cp jbang.jar dev.jbang.Main --version
0.102.0.7
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论