try {
context = Bootstrap.createInitialComponentContext(null);
} catch (RuntimeException e) {
throw e;
} catch (com.sun.star.uno.Exception e) {
throw new WrappedTargetRuntimeException(e.toString(), this, e);
} catch (Exception e) {
throw new com.sun.star.uno.RuntimeException(e.toString(), this);
}
final XAcceptor acceptor = Acceptor.create(context);
final XBridgeFactory factory;
try {
factory = (XBridgeFactory) UnoRuntime.queryInterface(
XBridgeFactory.class,
context.getServiceManager().createInstanceWithContext(
"com.sun.star.bridge.BridgeFactory", context));
} catch (com.sun.star.uno.Exception e) {
throw new WrappedTargetRuntimeException(e.toString(), this, e);
}
new Thread() {
public void run() {
try {
// Use "127.0.0.1" instead of "localhost", see #i32281#: