Import java class, dev.latvian.mods.rhino.NativeJavaClass cannot be cast to dev.latvian.mods.rhino.NativeJavaPackage
Tankonyako opened this issue ยท 10 comments
Error log: https://pastebin.com/rV1At2rg
Crashing when using Packages or import direclty.
How i can use java class in js?
I think the class has to be defined on its own, then you can use members
var JMath = java.lang.Math
console.info(JMath.PI)
I think the class has to be defined on its own, then you can use members
var JMath = java.lang.Math console.info(JMath.PI)
This is not working, same error, im tried too much examples from Rhino. This is bug without KubeJs.
Examples from here not working, and cause same error:
https://devopspoints.com/javascript-scripting-java-with-rhino.html
https://github.com/mozilla/rhino/blob/master/examples/NervousText.js
I think you can add method for class define to utils or make like API like in Nashorn Java.type("class")
, or fix this issue with Rhino.
I assume you're using latest version of KubeJS 1.16, because this was only added recently
I assume you're using latest version of KubeJS 1.16, because this was only added recently
yes.
in kubejs-1605.3.6-build.170 also not working.
I need another version of Rihno engine mod?
Ok, I get that error too now. Weird, that didn't happen before. I'll look into it
Found the issue, need to figure out how to fix. its something to do with Context#setClassShutter, it seems to block too much