// try {
com.sun.star.comp.servicemanager.ServiceManager smgr = new com.sun.star.comp.servicemanager.ServiceManager();
smgr.addFactories(neededServices, null);
XConnector xConnector = (XConnector)smgr.createInstance("com.sun.star.connection.Connector");
XConnection xConnection = xConnector.connect(argv[0]);
String rootOid = "classic_uno";
IBridge iBridge = UnoRuntime.getBridgeByName("java", null, "remote", null, new Object[]{"iiop", xConnection, null});
Object rInitialObject = iBridge.mapInterfaceFrom(rootOid, XInterface.class);