| View previous topic :: View next topic |
| Author |
Message |
nedim Newbie

Joined: 17 Mar 2003 Posts: 3
|
Posted: Wed Mar 19, 2003 11:25 pm Post subject: Detecting OO.o path from Java program |
|
|
Hello.
Could somebody please tell me the easiest way to detect path of OpenOffice.org from Java application, on machine with installed OO.o 1.0.2, but without ODK ?
Thanks. _________________ Nedim Azapagic
Globaloffice24 |
|
| Back to top |
|
 |
paolo General User

Joined: 02 Mar 2003 Posts: 31 Location: Italy
|
Posted: Thu Mar 20, 2003 2:30 pm Post subject: Re: Detecting OO.o path from Java program |
|
|
Hallo Nedim,
You can retrieve all path settings by the service com.sun.star.frame.Settings
Below, there's an example in StarBasic but I hope you can easily translate it into Java
NB:
Curently, the Settings service is deprecated but at the moment there's no other API's to get office paths.
However I've seen that this service is used by some autopilot, in the 1.0.1version and also in 643 build
Please, search in the dev@api.openoffice.org ML archives, you should find some threads about this argument
| Code: |
REM ***** BASIC *****
Sub Main
oSettings = createUnoService("com.sun.star.frame.Settings")
oPathSettings = oSettings.getByName("PathSettings")
msgbox oPathSettings.ProgPath
msgbox oPathSettings.dbg_properties
End Sub
|
hope this helps
Paolo Mantovani |
|
| Back to top |
|
 |
|