gpt4 book ai didi

java - server.sh 给我以下错误 Exception"main"java.lang.NoClassDefFoundError :

转载 作者:行者123 更新时间:2023-12-02 07:43:24 24 4
gpt4 key购买 nike

我正在尝试从终端启动“程序 D”,
终端“sh server.sh”中的命令给出以下错误

Starting Alicebot Program D. Exception in thread "main"
java.lang.NoClassDefFoundError: org/alicebot/server/net/AliceServer
Caused by: java.lang.ClassNotFoundException:
org.alicebot.server.net.AliceServer at
java.net.URLClassLoader$1.run(URLClassLoader.java:202) at
java.security.AccessController.doPrivileged(Native Method) at
java.net.URLClassLoader.findClass(URLClassLoader.java:190) at
java.lang.ClassLoader.loadClass(ClassLoader.java:306) at
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at
java.lang.ClassLoader.loadClass(ClassLoader.java:247)

我的Server.sh文件

ALICE_HOME=.SERVLET_LIB=lib/servlet.jar
ALICE_LIB=lib/aliceserver.jar
JS_LIB=lib/js.jar

# Set SQL_LIB to the location of your database driver.
SQL_LIB=lib/mysql_comp.jar

# These are for Jetty; you will want to change these if you are using a different http server.
HTTP_SERVER_LIBS=lib/org.mortbay.jetty.jar:lib/javax.xml.jaxp.jar:lib/org.apache.crimson.jar

PROGRAMD_CLASSPATH=$SERVLET_LIB:$ALICE_LIB:$JS_LIB:$SQL_LIB:$HTTP_SERVER_LIBS
java -classpath $PROGRAMD_CLASSPATH -Xms64m -Xmx64m org.alicebot.server.net.AliceServer $1

最佳答案

这可能是问题所在吗?

ALICE_HOME=.SERVLET_LIB=lib/servlet.jar

我找到了another question使用类似的 server.sh ,其中分为两行:

ALICE_HOME=.
SERVLET_LIB=lib/servlet.jar

在您的情况下,SERVLET_LIB 未正确设置(或根本没有),并且嵌入的等号稍后可能会破坏 PROGRAMD_CLASSPATH

关于java - server.sh 给我以下错误 Exception"main"java.lang.NoClassDefFoundError :,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11268785/

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