Closed Wushengyao closed 3 years ago
我是按照教程:
“使用 Mirai Console Loader 安装 Mirai login solver selenium
./mcl --update-package net.mamoe:mirai-login-solver-selenium --channel nightly --type plugin”
对mcl.jar运行如上命令,结果如下: "D:\Program Files\Java\jdk-14.0.2\bin\java.exe" -Dfile.encoding=GBK -jar C:\Users\wushengyao\Desktop\Tutorial\提交版v0.2\QQBot\mcl.jar --update-package net.mamoe:mirai-login-solver-selenium --channel nightly --type plugin 09:24:47 [INFO] iTXTech Mirai Console Loader version 1.0.5-9b6cf6d 09:24:47 [INFO] https://github.com/iTXTech/mirai-console-loader 09:24:47 [INFO] This program is licensed under GNU AGPL v3 09:24:47 [DEBUG] Loading script: announcement.js 09:24:47 [DEBUG] Loading script: boot.js 09:24:47 [DEBUG] Loading script: config.js 09:24:47 [DEBUG] Loading script: oraclejdk.js 09:24:47 [INFO] OracleJDK is detected. MCL will download BouncyCastle automatically. 09:24:47 [DEBUG] Loading script: repo.js 09:24:47 [DEBUG] Loading script: updater.js 09:24:47 [INFO] Package "net.mamoe:mirai-login-solver-selenium" has been added.
到此为止,安装正常。
但是在运行时会报:
20:00:47 [INFO] Verifying "net.mamoemirai-login-solver-selenium" version
20:00:47 [ERROR] org.mozilla.javascript.WrappedException: Wrapped java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1 (updater.js#45)
如您的回答,是PackageName少了一个“:”的问题,但是对于Jar包我怎么能修改里面的PackageName呢?反编译jar吗?
自行编辑mcl的 config.json, 主页的命令没有缺少 :
解决了,谢谢您!
"D:\Program Files\Java\jdk-14.0.2\bin\java.exe" -Dfile.encoding=GBK -jar C:\Users\wushengyao\Desktop\Tutorial\提交版v0.2\QQBot\mcl.jar 20:00:45 [INFO] iTXTech Mirai Console Loader version 1.0.5-9b6cf6d 20:00:45 [INFO] https://github.com/iTXTech/mirai-console-loader 20:00:45 [INFO] This program is licensed under GNU AGPL v3 20:00:45 [DEBUG] Loading script: announcement.js 20:00:46 [DEBUG] Loading script: boot.js 20:00:46 [DEBUG] Loading script: config.js 20:00:46 [DEBUG] Loading script: oraclejdk.js 20:00:46 [INFO] OracleJDK is detected. MCL will download BouncyCastle automatically. 20:00:46 [DEBUG] Loading script: repo.js 20:00:46 [DEBUG] Loading script: updater.js 20:00:46 [INFO] Fetching Mirai Console Loader Announcement... 20:00:47 [INFO] Mirai Console Loader Announcement: Mirai Console Loader 公告栏
20:00:47 [INFO] Verifying "org.bouncycastle:bcprov-jdk15on" version 1.64 20:00:47 [INFO] Verifying "net.mamoe:mirai-console" version 2.4.0 20:00:47 [INFO] Verifying "net.mamoe:mirai-console-terminal" version 2.4.0 20:00:47 [INFO] Verifying "net.mamoe:mirai-core-all" version 2.4.0 20:00:47 [INFO] Verifying "net.mamoemirai-login-solver-selenium" version 20:00:47 [ERROR] org.mozilla.javascript.WrappedException: Wrapped java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1 (updater.js#45) at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1899) at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:160) at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:226) at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1692) at script.checkLocalFile(updater.js:45) at script.check(updater.js:53) at script(updater.js:38) at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:1013) at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:109) at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:412) at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3578) at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:107) at org.mozilla.javascript.ArrowFunction.call(ArrowFunction.java:43) at org.mozilla.javascript.InterfaceAdapter.invokeImpl(InterfaceAdapter.java:155) at org.mozilla.javascript.InterfaceAdapter.lambda$invoke$0(InterfaceAdapter.java:105) at org.mozilla.javascript.Context.call(Context.java:554) at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:522) at org.mozilla.javascript.InterfaceAdapter.invoke(InterfaceAdapter.java:105) at org.mozilla.javascript.jdk18.VMBridge_jdk18$1.invoke(VMBridge_jdk18.java:126) at com.sun.proxy.$Proxy4.run(Unknown Source) at org.itxtech.mcl.script.ScriptManager.phaseLoad(ScriptManager.java:93) at org.itxtech.mcl.Loader.start(Loader.java:126) at org.itxtech.mcl.Loader.main(Loader.java:53) Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1 at org.itxtech.mcl.component.Config$Package.getName(Config.java:101) at org.itxtech.mcl.component.Config$Package.getBasename(Config.java:105) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:564) at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:138) ... 18 more