I have written a simple base64Encode class in Java that I want to use in serverside-JavaScript.
We already have a .jar file with some custom functions. In the same .jar is also a package 'nl.haarlem.utils' with some, guess what... utility functions

I added the new function as a static method to a new Class, named Encoding.
Then I used this import:
Code: Select all
importPackage(nl.haarlem.utils);
When I add the same class to the 'com.ebasetech.ufs.customfunctions' package of our .jar, I can import the package with:org.mozilla.javascript.EcmaError.ReferenceError: "nl" is not defined
Code: Select all
importPackage(com.ebasetech.ufs.customfunctions);
Do I have to 'register' our package-name to be able to use it?