+

Search Tips   |   Advanced Search

Instantiating the classes using the Config Editor

Use the Java Libraries folder of the Solution Logging and Settings window in the Config Editor to declare your classes. This works only if your class has a no-argument constructor, which is usually but not always the default constructor.

When adding a class object click Add... and specify two parameters: the script object name, that is, the name of the scripting variable that is an instance of your Java class, and the Java class name. For example, we can have a Script Object Name mycls while the Java Class might be my.java.classname. The mycls object will be available for any AssemblyLines defined before the Global Prologs execute.

Note: Note that this causes your object to be instantiated for every AssemblyLine run. If this is not desirable, and if you prefer to instantiate on demand, then see the next section.


Parent topic:

Accessing our own Java classes