Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java8 Nashorn Script Engine #112

Closed
kgamecarter opened this issue Jan 13, 2014 · 9 comments
Closed

Java8 Nashorn Script Engine #112

kgamecarter opened this issue Jan 13, 2014 · 9 comments
Milestone

Comments

@kgamecarter
Copy link

My server is run in Java8.
Nashorn Script Engine not support ScriptCraft.
Can make it be compatibility?

@walterhiggins
Copy link
Owner

can you attach the server console error?

@kgamecarter
Copy link
Author

I think the scriptcraft.js is not load successful at onEnable.

2014-01-13 17:41:16 [INFO] kgame issued server command: /js
2014-01-13 17:41:16 [SEVERE] [ScriptCraftPlugin] java.lang.NoSuchMethodException: No such function __onCommand
2014-01-13 17:41:16 [SEVERE] java.lang.NoSuchMethodException: No such function __onCommand
2014-01-13 17:41:16 [SEVERE] at jdk.nashorn.api.scripting.ScriptObjectMirror.callMember(ScriptObjectMirror.java:184)
2014-01-13 17:41:16 [SEVERE] at jdk.nashorn.api.scripting.NashornScriptEngine.invokeImpl(NashornScriptEngine.java:506)
2014-01-13 17:41:16 [SEVERE] at jdk.nashorn.api.scripting.NashornScriptEngine.invokeFunction(NashornScriptEngine.java:228)
2014-01-13 17:41:16 [SEVERE] at net.walterhiggins.scriptcraft.ScriptCraftPlugin.onCommand(Unknown Source)
2014-01-13 17:41:16 [SEVERE] at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44)
2014-01-13 17:41:16 [SEVERE] at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:192)
2014-01-13 17:41:16 [SEVERE] at org.bukkit.craftbukkit.v1_6_R2.CraftServer.dispatchCommand(CraftServer.java:527)
2014-01-13 17:41:16 [SEVERE] at net.minecraft.server.v1_6_R2.PlayerConnection.handleCommand(PlayerConnection.java:971)
2014-01-13 17:41:16 [SEVERE] at net.minecraft.server.v1_6_R2.PlayerConnection.chat(PlayerConnection.java:882)
2014-01-13 17:41:16 [SEVERE] at net.minecraft.server.v1_6_R2.PlayerConnection.a(PlayerConnection.java:829)
2014-01-13 17:41:16 [SEVERE] at net.minecraft.server.v1_6_R2.Packet3Chat.handle(SourceFile:49)
2014-01-13 17:41:16 [SEVERE] at org.spigotmc.netty.NettyNetworkManager.b(NettyNetworkManager.java:230)
2014-01-13 17:41:16 [SEVERE] at net.minecraft.server.v1_6_R2.PlayerConnection.e(PlayerConnection.java:116)
2014-01-13 17:41:16 [SEVERE] at net.minecraft.server.v1_6_R2.ServerConnection.b(SourceFile:37)
2014-01-13 17:41:16 [SEVERE] at org.spigotmc.netty.NettyServerConnection.b(NettyServerConnection.java:132)
2014-01-13 17:41:16 [SEVERE] at net.minecraft.server.v1_6_R2.MinecraftServer.t(MinecraftServer.java:592)
2014-01-13 17:41:16 [SEVERE] at net.minecraft.server.v1_6_R2.DedicatedServer.t(DedicatedServer.java:239)
2014-01-13 17:41:16 [SEVERE] at net.minecraft.server.v1_6_R2.MinecraftServer.s(MinecraftServer.java:481)
2014-01-13 17:41:16 [SEVERE] at net.minecraft.server.v1_6_R2.MinecraftServer.run(MinecraftServer.java:413)
2014-01-13 17:41:16 [SEVERE] at net.minecraft.server.v1_6_R2.ThreadServerApplication.run(SourceFile:582)

@walterhiggins
Copy link
Owner

Thanks @kgamecarter ,

This is a problem given that Java8 is coming soon. I'll make it a priority.

@SEAPUNK
Copy link
Contributor

SEAPUNK commented Jan 13, 2014

@walterhiggins From what I'm reading, it should be mostly the same, but I can't be too sure about it.
@kgamecarter Before you did the /js command, did it give you any other error? On load ScriptCraft invokes the __onEnable function, and if that invoked properly, then I think it's a context issue.

@walterhiggins
Copy link
Owner

@kgamecarter @Strategetical I've reproduced the problems @kgamecarter encountered. A fix is coming very soon.

@SEAPUNK
Copy link
Contributor

SEAPUNK commented Jan 13, 2014

@walterhiggins Did it fail to run the __onEnable function?

@walterhiggins
Copy link
Owner

Yes. Changes coming later today.

@SEAPUNK
Copy link
Contributor

SEAPUNK commented Jan 13, 2014

Alright. I'll test my fork with Java 8 too, to see if it has an issue with it.

@walterhiggins
Copy link
Owner

Latest build should work with JRE6, 7 and 8
http://scriptcraftjs.org/download/2014-01/2014-01-13/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants