I am currently creating a plugin for the Bukkit-Server, but i have a problem using the Nashorn scripting engine. I am evaluating the external javascript file from my Java-Plugin. I cant get my javascript to import the classes from my plugin, only standard java classes are working (like var JavaBool = Java.type('java.lang.Boolean');, but not var Holder = Java.type('io.github.advtest1.js.JSHolder');)
Whenever I try to load one of these I get the following error:
Caused by: java.lang.ClassNotFoundException: io.github.advtest1.js.JSHolder
After a bit of researching i found that it has something to do with my plugin-classes beeing in the classpath, but how can i add it to the classpath when Bukkit itself loads the plugin and i don't want any other startoptions for the server then java -jar bukkit.jar?
Feel free to ask, if you need additional information. Thanks in advance!
Javaand notJavaScript...javax.script.ScriptException: TypeError: [JavaClass io.github.advtest1.Log] has no such function "warnSel" in <eval> at line number 20Oh and yeah the warnSel()-method is public and static