OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Detecting OO.o path from Java program

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
nedim
Newbie
Newbie


Joined: 17 Mar 2003
Posts: 3

PostPosted: Wed Mar 19, 2003 11:25 pm    Post subject: Detecting OO.o path from Java program Reply with quote

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
View user's profile Send private message
paolo
General User
General User


Joined: 02 Mar 2003
Posts: 31
Location: Italy

PostPosted: Thu Mar 20, 2003 2:30 pm    Post subject: Re: Detecting OO.o path from Java program Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group