openoffice.org - Start and Stop OpenOffice Service using Java code? -


i have openoffice installed on both windows , linux machine. want write simple java application connect openoffice remotely , file conversion. want run openoffice service on both windows , linux on random port. after file conversion done, want stop service.

you need start first :

soffice -headless -accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard 

then use library connect , use service jodconverter

to call executable java :

process process = new processbuilder("c:\\pathtoexe\\myexe.exe","param1","param2").start(); 

you gave him path openoffice exe, each parameter (-headless...)

more infos in runtime.exec


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -