Closed jwulf closed 8 years ago
When calling ResourceFolder.create
you need to pass a class loader and path. What are you entering there?
I got around that issue - I had to do this: https://bukkit.org/threads/tutorial-use-external-library-s-with-your-plugin.103781/
Now I have two distinct issues:
I don't think you need to supply an absolute path, in particular the UT for FilesystemFolder
uses a relative path. Also that's how I use this lib in a separate project. But then there might be something I'm missing.
For the require part, do you prefix the name of the string to include with ./
, if it's a file in the same folder? This is required as per https://nodejs.org/api/modules.html (to the best of my understanding).
Yes, my require looks like require('./module1.js')
.
Inside module1.js
it has require('./module2.js')
. That second include fails.
Are you able to reproduce that issue outside Bukkit? Here it certainly works. Since you're getting a NoClassDefFound
I guess that somehow something is messing up with the class loader...
I include this in my pom.xml, and get this at runtime:
java.lang.NoClassDefFoundError: com/coveo/nashorn_modules/Folder
I'm loading it into a Bukkit plugin in Minecraft.