[udk-dev] Getting URE types from Java

2006-05-19 Thread Cedric Bosdonnat
Hi all,

I'm trying to integrate the URE in the Eclipse integration and I'm
getting into some troubles.

Is there any way to bootstrap the URE as we can do for OOo ? I'ld like
to bootstrap the URE in order to use XTypeDescriptionEnumerationAccess
and get the content of its types.rdb and services.rdb. If I try to
bootstrap the URE as I'm doing for OOo, I get a message like
No office executable found


Do I need to develop a specific component exporting XMain to bootstrap
the URE and query it's types ?

Thanks for your help,
Cedric

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



Re: [udk-dev] Getting URE types from Java

2006-05-19 Thread Cedric Bosdonnat
Hi Stefan,

thanks for your quick answer :)

Stephan Bergmann a écrit :


 You are probably using com.sun.star.comp.helper.Bootstrap.bootstrap.
 Despite being included in a URE jar, this is OOo-specific functionality,
 so it is by design that it fails for you.  Poor design indeed, I agree...

That's what I thought...

 1  Start a native process (uno executable) and let it run your Java code
 as an XMain component (see test-javatest in
 ure/source/uretest/Makefile[.pln] for an example).  That way, the uno
 executable takes care of all the UNO bootstrapping and your XMain
 component runs in an environment where the information from types.rdb
 and services.rdb is accessible.

This solution will certainly the best one for the moment, but I'ld like
to switch to the second when the
Bootstrap.defaultBootstrap_InitialComponentContext won't break when
called from a custom ClassLoader.

 2  Start a Java process that bootstraps a native UNO environment in
 process via
 com.sun.star.comp.helper.Bootstrap.defaultBootstrap_InitialComponentContext
 (see test-javanative in ure/source/uretest/Makefile[.pln] for an
 example).  That way, the returned XComponentContext gives you access to
 an environment where the information from types.rdb and services.rdb is
 accessible.

Good to hear that this is possible: it would be the same way for OOo and
the URE. However as explained upper, there are still some bugs and I'll
wait for them to be fixed on every platform.

 3  If your are only interested in information about specific UNO types
 from types.rdb, and not the UNO services from services.rdb, some
 information about those types is also available in a plain Java UNO
 environment from com.sun.star.uno.Type (esp. Type.getTypeDescription).

In fact this could be very good for code auto-completion I think, but
not to get a list of all the types as I'm doing.

Thanks for your help,
Cedric

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



Re: [udk-dev] Getting URE types from Java

2006-05-19 Thread Cedric Bosdonnat
Stephan Bergmann a écrit :

 I may have made a mistake by writing the findLibrary method()... but I
 can't see which one. Does the libjuh.so library loads some .uno.so
 library ? This might be a problem because my ClassLoader doesn't return
 them...
 
 Em, Jürgen just reminded me that there still is an issue in juh.jar
 (using System.loadLibrary instead of NativeLibraryLoader), that he gave
 you a modified juh.jar the other day, and that you claimed that it
 worked with that juh.jar on Linux.  Is it so that your problems will be
 gone on Linux once that modification to juh.jar is committed (in which
 case I only caused confusion with my questions)?

Indeed he gave me the modified file, however I can't integrate it in the
plugin now: I'll have to wait it to be integrated in the official
distribution. I have to wait for the windows fixes too: that's why I'm
trying to find a not so clean solution to avoid this bug and integrate
the URE as well.

Thanks for your and Juergen's help
Cedric

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



Re: [udk-dev] Getting URE types from Java

2006-05-19 Thread Cedric Bosdonnat
Hi Juergen,

Jürgen Schmidt a écrit :

 The issue number is i65388 and the problem is that dependent libraries
 can't be found. For Unix this issue is fixed by using the
 NativeLibraryLoader in juh.jar to load the libjuh.so. libjuh.so is
 linked with a correct rpath to find it's dependent libraries.
 But under Windows there is no rpath link option available and i am
 currently evaluating a different approach.
 I will keep you informed.

Good to have the issue number: I'll watch it :) I didn't know about
NativeLibraryLoader: that helps me to understand the problem.

Thanks for your help,
Cedric

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