jairorivero Newbie

Joined: 26 Oct 2007 Posts: 1
|
Posted: Fri Oct 26, 2007 7:00 am Post subject: Problem when load openoffice with tomcat as service |
|
|
Hello, I am new in this forun, i am not write english perfect, sorry.
I have one problem
I have tomcat y openoffice, when start tomcat as DOS console, no problem. when start openoffice as window service, it is stop when new instance bootstrap(), this is method what open document.
public XComponent openFile(String sourceFile) throws Exception {
// get the remote office component context
System.out.println("Voy a conectarme a office ...");
com.sun.star.uno.XComponentContext xContext = com.sun.star.comp.helper.Bootstrap.bootstrap(); // this point, no application move, is loop ??????
System.out.println("Connected to a running office ...");
// get the remote office service manager
com.sun.star.lang.XMultiComponentFactory xMCF = xContext.getServiceManager();
Object oDesktop = xMCF.createInstanceWithContext("com.sun.star.frame.Desktop", xContext);
xCompLoader = (com.sun.star.frame.XComponentLoader) UnoRuntime.queryInterface(com.sun.star.frame.XComponentLoader.class, oDesktop);
//System.out.println(sourceFile);
//sourceFile = sourceFile.replaceAll("\\\\","\\");
System.out.println(sourceFile);
System.out.println(toUrlFile(sourceFile));
return xCompLoader.loadComponentFromURL(toUrlFile(sourceFile), "_blank", 0, MakePropertyValue(new String[]{"Hidden"},new Object[]{new Boolean(true)}));
}
i write de classpath.
this is line in command line.
tomcat5 //TS//Tomcat5 --Classpath="%JAVA_HOME%\lib\tools.jar";"%CATALINA_HOME%\bin\bootstrap.jar";"C:\Program Files\OpenOffice.org 2.3\program\classes\jurt.jar";"C:\Program Files\OpenOffice.org 2.3\program\classes\juh.jar";"C:\Program Files\OpenOffice.org 2.3\program\classes\unoil.jar";"C:\Program Files\OpenOffice.org 2.3\program\classes\ridl.jar";"C:\Program Files\OpenOffice.org 2.3\program\soffice.exe"
run perfect, but window service, loop loop loop loop loop
Help me please
Thanks avance |
|