Thank you, I've got the directory. I've a little problem now : the string is "encoded", like in UTF8. For instance, space = %20, é=%C3%A9. And this path will always contain spaces (on Windows), and probably accented characters (if the user has accents in his user name).
Is there a way to simply decode this string, or must I replace special chars by myself ? Thank you -----Message d'origine----- De : stephan.bergm...@sun.com [mailto:stephan.bergm...@sun.com] Envoyé : lundi 9 novembre 2009 13:27 À : dev@lingucomponent.openoffice.org Objet : Re: [lingu-dev] Deploying external resources On 11/09/09 12:53, Clément Picou (Synapse) wrote: > My grammar checker extension uses external resources, like dictionaries. I > need to deploy them with my oxt. > In my oxt build.xml, I've added and instruction to copy the resources in the > destination directory. > It works. If I check in "Application > Data\OpenOffice.org\3\user\uno_packages\cache\uno_packages\6E.tmp_\myExtensi > on.oxt\", I see my dictionaries (I'm on a Windows computer). > You can see it's a dynamic directory, because it depends of the user name, > and the 6E.tmp_ directory name is generated at the oxt installation. > > Now in my Main class, I need to get this dictionary directory. But > "Application > Data\OpenOffice.org\3\user\uno_packages\cache\uno_packages\6E.tmp_\myExtensi > on.oxt\", that is to say the directory where the extension is deployed, and > where my .jar is, is not the current directory. > The current directory is "C:\Program Files\OpenOffice.org 3\program". The UNO singleton com.sun.star.deployment.PackageInformationProvider has a method getPackageLocation that makes available that information. -Stephan --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lingucomponent.openoffice.org For additional commands, e-mail: dev-h...@lingucomponent.openoffice.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lingucomponent.openoffice.org For additional commands, e-mail: dev-h...@lingucomponent.openoffice.org