使用-Djava.ext.dirs = lib选项启动craftbukkit时出错

时间:2015-07-28 21:39:59

标签: java minecraft bukkit

我正在尝试使用选项-Djava.ext.dirs = lib启动craftbukkit 但是,当我尝试与客户端连接时,我收到错误。

我从以下启动命令开始:

java -Xms1024M -Xmx1024M -jar craftbukkit.jar

这很好用:

Loading libraries, please wait...
[22:18:46 INFO]: Starting minecraft server version 1.7.10
[22:18:46 INFO]: Loading properties
[22:18:46 INFO]: Default game type: SURVIVAL
[22:18:46 INFO]: Generating keypair
[22:18:46 INFO]: Starting Minecraft server on *:25565
[22:18:47 INFO]: This server is running CraftBukkit version git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks (MC: 1.7.10) (Implementing API version 1.7.10-R0.1-SNAPSHOT)
[22:18:47 INFO]: Preparing level "world"
[22:18:47 INFO]: Preparing start region for level 0 (Seed: 7985848474339719790)
[22:18:48 WARN]: Could not get information about this CraftBukkit version; perhaps you are running a custom one?: FileNotFoundException
[22:18:48 INFO]: Preparing spawn area: 68%
[22:18:48 WARN]: Could not get latest artifact information: FileNotFoundException
[22:18:49 INFO]: Preparing start region for level 1 (Seed: 524789769407484853)
[22:18:50 INFO]: Preparing spawn area: 75%
[22:18:50 INFO]: Preparing start region for level 2 (Seed: 524789769407484853)
[22:18:50 INFO]: Server permissions file permissions.yml is empty, ignoring it
[22:18:50 INFO]: Done (3.111s)! For help, type "help" or "?"
[22:21:02 INFO]: UUID of player MagicPixelPunk is 0322446d-6b92-4b63-af77-98d673
9ec53b
[22:21:02 INFO]: MagicPixelPunk[/127.0.0.1:52373] logged in with entity id 241 a
t ([world] -163.30000001192093, 65.0, -141.42108342787006)
[22:21:12 INFO]: MagicPixelPunk lost connection: Disconnected
[22:21:12 INFO]: MagicPixelPunk left the game.

然后我尝试使用以下启动命令

java -Djava.ext.dirs=lib -Xms1024M -Xmx1024M -jar craftbukkit.jar

Craftbukkit开始很好,但是当我尝试与客户端连接时,我遇到了安全错误:

[22:23:06 INFO]: Starting minecraft server version 1.7.10
[22:23:06 INFO]: Loading properties
[22:23:06 INFO]: Default game type: SURVIVAL
[22:23:06 INFO]: Generating keypair
[22:23:06 INFO]: Starting Minecraft server on *:25565
[22:23:07 INFO]: This server is running CraftBukkit version git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks (MC: 1.7.10) (Implementing API version 1.7.10-R0.1-SNAPSHOT)
[22:23:07 INFO]: Preparing level "world"
[22:23:07 INFO]: Preparing start region for level 0 (Seed: 7985848474339719790)
[22:23:08 WARN]: Could not get information about this CraftBukkit version; perhaps you are running a custom one?: FileNotFoundException
[22:23:08 INFO]: Preparing spawn area: 73%
[22:23:08 WARN]: Could not get latest artifact information: FileNotFoundException
[22:23:08 INFO]: Preparing start region for level 1 (Seed: 524789769407484853)
[22:23:09 INFO]: Preparing spawn area: 75%
[22:23:10 INFO]: Preparing start region for level 2 (Seed: 524789769407484853)
[22:23:10 INFO]: Server permissions file permissions.yml is empty, ignoring it
[22:23:10 INFO]: Done (3.053s)! For help, type "help" or "?"    
[22:23:43 WARN]: java.security.NoSuchAlgorithmException: Cannot find any provider supporting RSA
    [22:23:43 WARN]:        at javax.crypto.Cipher.getInstance(Cipher.java:524)
    [22:23:43 WARN]:        at net.minecraft.server.v1_7_R4.MinecraftEncryption.a(SourceFile:110)
    [22:23:43 WARN]:        at net.minecraft.server.v1_7_R4.MinecraftEncryption.a(SourceFile:98)
    [22:23:43 WARN]:        at net.minecraft.server.v1_7_R4.MinecraftEncryption.b(SourceFile:93)
    [22:23:43 WARN]:        at net.minecraft.server.v1_7_R4.PacketLoginInEncryptionBegin.b(SourceFile:50)
    [22:23:43 WARN]:        at net.minecraft.server.v1_7_R4.LoginListener.a(LoginListener.java:108)
    [22:23:43 WARN]:        at net.minecraft.server.v1_7_R4.PacketLoginInEncryptionBegin.a(SourceFile:39)
    [22:23:43 WARN]:        at net.minecraft.server.v1_7_R4.PacketLoginInEncryptionBegin.handle(SourceFile:12)
    [22:23:43 WARN]:        at net.minecraft.server.v1_7_R4.NetworkManager.a(NetworkManager.java:157)
    [22:23:43 WARN]:        at net.minecraft.server.v1_7_R4.ServerConnection.c(SourceFile:134)
    [22:23:43 WARN]:        at net.minecraft.server.v1_7_R4.MinecraftServer.v(MinecraftServer.java:667)
    [22:23:43 WARN]:        at net.minecraft.server.v1_7_R4.DedicatedServer.v(DedicatedServer.java:258)
    [22:23:43 WARN]:        at net.minecraft.server.v1_7_R4.MinecraftServer.u(MinecraftServer.java:558)
    [22:23:43 WARN]:        at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java:469)
    [22:23:43 WARN]:        at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:628)
    [22:23:43 WARN]: Cipher creation failed!
    [22:23:43 WARN]: Failed to handle packet for /127.0.0.1:52464
    java.lang.NullPointerException
            at net.minecraft.server.v1_7_R4.MinecraftEncryption.a(SourceFile:98) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at net.minecraft.server.v1_7_R4.MinecraftEncryption.b(SourceFile:93) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at net.minecraft.server.v1_7_R4.PacketLoginInEncryptionBegin.b(SourceFile:50) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at net.minecraft.server.v1_7_R4.LoginListener.a(LoginListener.java:108)~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at net.minecraft.server.v1_7_R4.PacketLoginInEncryptionBegin.a(SourceFile:39) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at net.minecraft.server.v1_7_R4.PacketLoginInEncryptionBegin.handle(SourceFile:12) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at net.minecraft.server.v1_7_R4.NetworkManager.a(NetworkManager.java:157) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at net.minecraft.server.v1_7_R4.ServerConnection.c(SourceFile:134) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at net.minecraft.server.v1_7_R4.MinecraftServer.v(MinecraftServer.java:667) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at net.minecraft.server.v1_7_R4.DedicatedServer.v(DedicatedServer.java:258) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at net.minecraft.server.v1_7_R4.MinecraftServer.u(MinecraftServer.java:558) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java:469) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:628) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
    [22:23:43 INFO]: net.minecraft.util.com.mojang.authlib.GameProfile@177c3e7[id=<null>,name=MagicPixelPunk,properties={},legacy=false] (/127.0.0.1:52464) lost connection: Internal server error

任何想法为什么会以这种方式失败以及如何解决?

Running on windows 7.
java version "1.7.0_79"
Java(TM) SE Runtime Environment (build 1.7.0_79-b15)
Java HotSpot(TM) Client VM (build 24.79-b02, mixed mode, sharing)

1 个答案:

答案 0 :(得分:3)

  

如果覆盖java.ext.dirs,请确保添加默认值(有关平台的详细信息,请参阅http://docs.oracle.com/javase/6/docs/technotes/guides/extensions/spec.html)。

     

因此,在Windows上,它应该真正反映类似于:   “-Djava.ext.dirs = C:\ Program Files \ Java \ jdk1.7.0_05 \ jre \ lib \ ext; my-externals-folder”

来源:https://bukkit.atlassian.net/browse/BUKKIT-2070

所以对你来说,你可能想要使用看起来像这样的标志:

-Djava.ext.dirs = C:\ Program Files \ Java \ jdk1.7.0_79 \ jre \ lib \ ext; lib