Dinesh Chothe wrote:
   Hello,
             I am building one extension(.oxt) using  netbeans  and  java.
             In which task using some external libraries (Dlls).
             So  how do I  include  this  external  libraries while building
oxt?
               ,so it can be work on any machine.

No idea how to do that with Netbeans, but in general you have two options.

In either case, include the dynamic library somewhere in your oxt (but do not list it in the oxt's manifest).

Then, at runtime, your Java code in the oxt can use the com.sun.star.deployment.PackageInformationProvider to obtain the URI (in OOo-internal notation) of its location, from there navigate to the included dynamic library, and ultimately use System.load to load it.

Or, in the manifest of the jar included in the oxt, include a Class-Path pointing to the directory containing the included dynamic library, and use a combination of ClassLoader.getResource and System.load to load the library.

(If the dynamic library depends on other dynamic libraries you also want to include in the oxt, depending on platform you run into some trouble. In case you need that, let me know, I can give you sketches of what to do on the various platforms.)

-Stephan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to