Code: Select all
List liste = ooo.connector.server.OOoServer.getDefaultOOoOptions();
liste.clear();
//liste.add("-nologo");
liste.add("--nodefault");
liste.add("--norestore");
oooExeFolder = "/opt/openoffice4/program";
ooo.connector.server.OOoServer server = new ooo.connector.server.OOoServer(oooExeFolder, liste);
[color=#800000]server.start("-accept=\"socket,host=localhost,port=8699;urp;StarOffice.ServiceManager\"");[/color]
System.out.println(server.toString());
BootstrapSocketConnector oooConnector = new BootstrapSocketConnector(server);
xContext = oooConnector.connect();
xMultiComponentFactory = xContext.getServiceManager();
xcomponentloader = (XComponentLoader) UnoRuntime.queryInterface(XComponentLoader.class,xMultiComponentFactory.createInstanceWithContext("com.sun.star.frame.Desktop", xContext));
PropertyValue[] argumente = new PropertyValue[1];
argumente[0] = new PropertyValue();
argumente[0].Name="MacroExecutionMode";
argumente[0].Value=com.sun.star.document.MacroExecMode.ALWAYS_EXECUTE_NO_WARN;
objectDocumentToStore = (XComponent) xcomponentloader.loadComponentFromURL(loadUrl, "_default", 2, argumente);
Code: Select all
server.start("-accept=\"socket,host=localhost,port=8700;urp;StarOffice.ServiceManager\"");
Code: Select all
/opt/openoffice4/program/soffice -accept="socket,host=localhost,port=8699;urp;StarOffice.ServiceManager"
Now user 2 types
Code: Select all
/opt/openoffice4/program/soffice -accept="socket,host=localhost,port=8700;urp;StarOffice.ServiceManager"
sudo netstat -a gives me the information that ports 8699 and 8700 are in listening mode.
Some advice would be highly appreciated
Best regards and thanks in advance
Andeas from wmpartner