This method of the IJavaExecute interface loads a Java class and executes its static main method. The main method must have the following signature:
public static void main( String[] );
HRESULT Execute(LPJAVAEXECUTEINFO pJavaExecuteInfo, LPERRORINFO *ppErrorInfo);
If the main method runs successfully and does not throw an uncaught Java exception, the Execute method returns S_OK and ppErrorInfo is set to NULL.
If the main method runs successfully and throws an uncaught Java exception, the Execute method returns S_OK and ppErrorInfo is set to an IErrorInfo object that describes the exception.
If the class is not found or does not expose a main method, or if there are insufficient resources to run the method, the Execute method returns a failing HRESULT.
pJavaExecuteInfo | Provides the name of the class, the arguments, and the execution environment. See JAVAEXECUTEINFO. |
*ppErrorInfo | Points to a buffer that receives an IErrorInfo interface object if the main method throws a Java exception. This parameter can be NULL if this information is not needed. |