}
if ( oPersObj == null ) {
// object is not available: it has to be registered
String url = util.utils.getFullTestURL
("qadevlibs/MyPersistObjectImpl.jar");
XImplementationRegistration xir;
try {
Object o = xMSF.createInstance(
"com.sun.star.registry.ImplementationRegistration");
xir = (XImplementationRegistration)
UnoRuntime.queryInterface(
XImplementationRegistration.class, o);
}
catch (com.sun.star.uno.Exception e) {
System.err.println(
"Couldn't create implementation registration");
e.printStackTrace();
throw new StatusException("Couldn't create ImplReg", e);
}
XSimpleRegistry xReg = null;
try {
System.out.println("Register library: " + url);
xir.registerImplementation(
"com.sun.star.loader.Java2", url, xReg);
System.out.println("...done");
} catch (CannotRegisterImplementationException e) {
System.err.println("Name: " + url + " msg: " +
e.getMessage());