Class not Loaded Error

This functionality is supported only if you are using the Classic Agent.

You should not simply add the .jar file containing the Java class referenced in the InvokeJava() call to the directory containing the .jar files used by your application. InvokeJava() will be able to load your Java class only if it can be loaded by one of the following class loaders. If you receive a Class Not Loaded error when calling InvokeJava():

  1. By default, InvokeJava() uses the ext class loader. To use this loader, the .jar file containing the Java class referenced in the InvokeJava() call should reside in the JVM's lib\ext directory with SilkTest's .jar file, which is SilkTest_Java3.jar. The class should be in the root directory of the .jar file, so that there is no path information in the .jar file.
  2. Alternatively, InvokeJava() can use the application class loader. To use this loader, the .jar file containing the Java class referenced in the InvokeJava() call should be part of the application's classpath.