JavaObject class (LotusScript® Language)

The JavaObject Reference is the key to connecting with a Java object. It is returned from the CreateObject method of the JavaClass class or the GetJavaObject function. It is similar to an OLE reference and represents a Java object instance. The properties and methods are adapted automatically. It can be assigned only to a Variant.

Although Java Native Interface (JNI) allows us to look at properties (fields) and methods with different protected attributes, LotusScript® adapts only the public ones.


[adaptive -- all public fields (static, instance)]


[adaptive -- all public methods (static, instance)]


The JavaObject reference is not set if LotusScript® has problems adapting the specified Java object. If the program tries to use the properties or methods, it raises an "Object Variable Not Set" error.


Due to LotusScript® limitations, you cannot access the following properties and methods:

  • Properties and methods with names over 40 characters
  • Properties and methods with names that differ only in case (LotusScript® is not case sensitive whereas Java is)
  • Methods with the same name and number of arguments, but with a different signature

For these conditions, you must explicitly use JavaProperty class and JavaMethod class.