Home > Class Reference > %SYS namespace > %ZHSLIB.PackageManager.Developer.Java

%ZHSLIB.PackageManager.Developer.Java

class %ZHSLIB.PackageManager.Developer.Java

Utility class for installing a Java library and helper methods for using it at runtime.

Method Inventory

Parameters

parameter SERVER = 127.0.0.1;
Java Runtime is expected to be hosted locally.

Methods

classmethod EnableJVMConnection(pResourceName As %String, jarPath As %String = "", pVerbose As %Boolean = 0) [ Language = objectscript ]
Creates an object gateway definition for a module which uses the JavaLibrary processor class. Must be run from the library namespace, since that contains the processor with the library information
classmethod GetGateway(pResourceName As %String) as %Net.Remote.Gateway [ Language = objectscript ]
Returns a %Net.Remote.Gateway object, used for a specific IRIS process to connect with the JVM. Will try to use shared memory.
classmethod HandleJavaException(ex As %Exception.AbstractException) [ Language = objectscript ]
Utility that can be placed in a "catch" block which is "try"ing Java code. If the error occurred in Java, will extract and throw the relevent error message.
classmethod Uninstall(pResourceName As %String, pVerbose As %Boolean = 0) [ Language = objectscript ]
Uninstalls the object gateway from the instance. This is an instance- wide uninstall, not namespace-wide, so it shouldn't be called if only a namespace is being uninstalled.
FeedbackOpens in a new window