| |
Accessing your own Java classes
- The easiest way is to use the Java Libraries under the Configuration
tab in the Administrator.
Script Object Name would be "mycls" while the Java Class
could be my.java.classname. You will then have access to an instance
of mycls that would be available wherever system is
available. For example, the well known (?) system
object is really the java object com.architech.function.userFunctions2
- (Assuming you script with Javascript)
// All standard classes (e.g. starts with "java.")
var javafile = new java.io.FileReader ( "myfile" );
// All non-standard classes
var myfile = new Packages.my.FileReader ("myfile");
For scriptlanguages that do not support new java.*:
Use the newObject (className) method found in the System
object:
var f = system.newObject
("java.io.File");
| |
|