Thank you very much, it works! By the way, my component is written in Java, so if anyone needs it, I put the function (found on a website) that converts an URL into a path at the end of this mail.
Finally, to complete my deployment, I need to launch an executable that I've embedded in the oxt. Is there a way to do that during the oxt installation? Thank you public static String convertFromURL(XComponentContext xContext, String sFileURL) { String sSystemPath = null; try { com.sun.star.ucb.XFileIdentifierConverter xFileConverter = (com.sun.star.ucb.XFileIdentifierConverter) UnoRuntime .queryInterface( com.sun.star.ucb.XFileIdentifierConverter.class, xContext .getServiceManager().createInstanceWithContext( "com.sun.star.ucb.FileContentProvider", xContext)); sSystemPath = xFileConverter.getSystemPathFromFileURL(sFileURL); } catch (java.lang.Exception e) { e.printStackTrace(); } finally { return sSystemPath; } } -----Message d'origine----- De : stephan.bergm...@sun.com [mailto:stephan.bergm...@sun.com] Envoyé : lundi 9 novembre 2009 16:28 À : dev@lingucomponent.openoffice.org Objet : Re: [lingu-dev] Deploying external resources On 11/09/09 15:40, Clément Picou (Synapse) wrote: > 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). com.sun.star.deployment.XPackageInformationProvider.getPackageLocation returns a URL (that will always be an absolute file URL, in OOo internal format---see the documentation of com.sun.star.uri.XExternalUriReferenceTranslator for the distinction of internal and external URIs). If you rather need a C-style system-specific pathname corresponding to that URL (e.g., to pass it to fopen), use osl::FileBase::getSystemPathFromFileURL (from osl/file.hxx). -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