Create java UNO-IDL project and using non-natif librairies

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Create java UNO-IDL project and using non-natif librairies

Philippe Denis
Hello,

I create a java UNO-IDL project in eclipse. In this project, I use  
external librairies. After, I deploy my module in OO without any  
problem.
However, when I launch my macro that uses my module, I receive an  
error : some classes are not found during the execution.

I understand that when I deploy my module in OO, my libriairies are  
not imported in OpenOffice.

Do you know how I can use external librairies? or Do you know if it's  
possible to use an external librairie in a UNO-IDL project?

The external libriaire is just a .jar file that I created.

Thank you very much.


Philippe

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Create java UNO-IDL project and using non-natif librairies

Juergen Schmidt-3
On 1/29/10 10:27 AM, Philippe Denis wrote:

> Hello,
>
> I create a java UNO-IDL project in eclipse. In this project, I use
> external librairies. After, I deploy my module in OO without any problem.
> However, when I launch my macro that uses my module, I receive an error
> : some classes are not found during the execution.
>
> I understand that when I deploy my module in OO, my libriairies are not
> imported in OpenOffice.
>
> Do you know how I can use external librairies? or Do you know if it's
> possible to use an external librairie in a UNO-IDL project?
>
> The external libriaire is just a .jar file that I created.

let's assume your service is defined in IDL mytypes.idl ->
mytypes.[rdb|jar] and implemented in myimpl.jar. And you have an
additional library myhelper.jar.

The structure in your oxt looks like

\...
\mytypes.rdb
\mytypes.jar
\myimple.jar
\lib\myhelper.jar

Then you need at least the following manifest entries in your myimple.jar

UNO-Type-Path: mytypes.jar.jar
Class-Path: lib/myhelper.jar
RegistrationClassName: <the name of your implementation class or the
appropriate registration class>

This means that mytypes.jar are loaded globally to make the new types
available. myhelper.jar is a direct dependency of myimpl.jar and loaded
via the same classloader that loads your myimpl.jar. Every extensions is
loaded in their own classloader. This classlaoder inherit the env of the
global classloader.

I hope this helps

Juergen

>
> Thank you very much.
>
>
> Philippe
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Create java UNO-IDL project and using non-natif librairies

Philippe Denis

Le 29-janv.-10 à 11:20, Juergen Schmidt a écrit :
>
>
> UNO-Type-Path: mytypes.jar.jar
> Class-Path: lib/myhelper.jar
> RegistrationClassName: <the name of your implementation class or the  
> appropriate registration class>
>
If I have many librairies to add at the class-Path, what's the right  
solution :
Class-Path: lib/myhelper.jar lib/myhelper2.jar

or

Class-Path: lib/myhelper.jar
Class-Path: lib/myhelper2.jar

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Create java UNO-IDL project and using non-natif librairies

Juergen Schmidt-3
On 1/29/10 1:13 PM, Philippe Denis wrote:

>
> Le 29-janv.-10 à 11:20, Juergen Schmidt a écrit :
>>
>>
>> UNO-Type-Path: mytypes.jar.jar
>> Class-Path: lib/myhelper.jar
>> RegistrationClassName: <the name of your implementation class or the
>> appropriate registration class>
>>
> If I have many librairies to add at the class-Path, what's the right
> solution :
> Class-Path: lib/myhelper.jar lib/myhelper2.jar
>
this one ;-)

Juergen

> or
>
> Class-Path: lib/myhelper.jar
> Class-Path: lib/myhelper2.jar
>
> Thanks
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Create java UNO-IDL project and using non-natif librairies

Philippe Denis
  When I try to apply your advies and I install my extension in  
OpenOffice, during the installation I receive this error : "Got no  
data stream!"
After my extension is installed...

Le 29-janv.-10 à 13:27, Juergen Schmidt a écrit :

> On 1/29/10 1:13 PM, Philippe Denis wrote:
>>
>> Le 29-janv.-10 à 11:20, Juergen Schmidt a écrit :
>>>
>>>
>>> UNO-Type-Path: mytypes.jar.jar
>>> Class-Path: lib/myhelper.jar
>>> RegistrationClassName: <the name of your implementation class or the
>>> appropriate registration class>
>>>
>> If I have many librairies to add at the class-Path, what's the right
>> solution :
>> Class-Path: lib/myhelper.jar lib/myhelper2.jar
>>
> this one ;-)
>
> Juergen
>
>> or
>>
>> Class-Path: lib/myhelper.jar
>> Class-Path: lib/myhelper2.jar
>>
>> Thanks
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]