gpt4 book ai didi

playframework - Play Framework : java. lang.NoClassDefFoundError : Could not initialize class org. fusesource.jansi.internal.Kernel32

转载 作者:行者123 更新时间:2023-12-01 16:05:01 25 4
gpt4 key购买 nike

我安装了 play 框架,并使用 hello-play-java 模板创建了一个应用程序。编译时出现错误:

Refreshing list of source files to watch for changes...
[ERROR] Terminal initialization failed; falling back to unsupported
java.lang.NoClassDefFoundError: Could not initialize class org.fusesource.jansi.internal.Kernel32
at org.fusesource.jansi.internal.WindowsSupport.getConsoleMode(WindowsSupport.java:50)
at jline.WindowsTerminal.getConsoleMode(WindowsTerminal.java:177)
at jline.WindowsTerminal.init(WindowsTerminal.java:80)
at jline.TerminalFactory.create(TerminalFactory.java:101)
at jline.TerminalFactory.get(TerminalFactory.java:159)
at sbt.ConsoleLogger$.ansiSupported(ConsoleLogger.scala:86)
at sbt.ConsoleLogger$.<init>(ConsoleLogger.scala:80)
at sbt.ConsoleLogger$.<clinit>(ConsoleLogger.scala)
at sbt.GlobalLogging$.initial(GlobalLogging.scala:40)
at sbt.StandardMain$.initialGlobalLogging(Main.scala:64)
at sbt.StandardMain$.initialState(Main.scala:73)
at sbt.xMain.run(Main.scala:29)
at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109)
at xsbt.boot.Launch$.withContextLoader(Launch.scala:129)
at xsbt.boot.Launch$.run(Launch.scala:109)
at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:36)
at xsbt.boot.Launch$.launch(Launch.scala:117)
at xsbt.boot.Launch$.apply(Launch.scala:19)
at xsbt.boot.Boot$.runImpl(Boot.scala:44)
at xsbt.boot.Boot$.main(Boot.scala:20)
at xsbt.boot.Boot.main(Boot.scala)
[info] Loading project definition from D:\play\playtemplate\hello-play-java\project

我的操作系统是 windows 8.1。我试过32位和64位jdk 1.6,64位jdk1.7,总是这个错误。

我应该怎么做才能解决这个问题。谢谢。

最佳答案

NoClassDefFoundError 指定类在编译时可用但在运行时丢失。在您的情况下,org.fusesource.jansi.internal.Kernel32 在运行时不可用或未初始化。尝试添加 Jansi jar 的引用到你的项目。关于 how to debug a NoClassDefFoundError 可以引用这个

关于playframework - Play Framework : java. lang.NoClassDefFoundError : Could not initialize class org. fusesource.jansi.internal.Kernel32,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26925410/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com