We can call external Java classes ; that is, those we have added to the Tivoli Directory Integrator runtime environment, or the CLASSPATH, using script code.
For example, assuming we want to use the standard java.io.FileReader, use the following script:
var javafile = new java.io.FileReader( "myfile" );
You now have an object called javafile; using it we can call all of the methods of the object.
The same technique is used to instantiate our own objects:
var myfile = new my.FileReader("myfile");
Parent topic: Java + Script ≠ JavaScript