Hi Stephan,

Selon Stephan Bergmann <[EMAIL PROTECTED]>:

> > I already read many times this example, however it appeared more clearer
> this
> > time: I used the regcomp of the SDK: I used the one of the ure and it is
> still
> > better: I only have a problem of classpath to solve now. regcomp tells me
> that
> > css.lang.XMain is not found, however the ridl.jar file is added to the
> > classpath.
>
> That problem is quite tricky.  With some debug code in
> jurt/com/sun/star/comp/loader/RegistrationClassFinder.java, to find out
> what class loader chain is used exactly to load the component's
> org.stareditor.comp.MyMain class, the output
>
>   [EMAIL PROTECTED]
>    file:/export/home/sb93797/source/ure.m130/UNOTest/stareditor.uno.jar
>
>   [EMAIL PROTECTED]
>    file:/opt/openoffice.org/ure/share/java/java_uno.jar
>    file:/opt/openoffice.org/ure/share/java/juh.jar
>    file:/opt/openoffice.org/ure/share/java/jurt.jar
>    file:/opt/openoffice.org/ure/share/java/ridl.jar
>    file:/export/home/sb93797/source/ure.m130/UNOTest/stareditor.uno.jar
>
>   [EMAIL PROTECTED]
>    file:/opt/openoffice.org/ure/share/java/unoloader.jar
>
>   [EMAIL PROTECTED]
>    file:/export/home/sb93797/source/ure.m130/UNOTest/
>    file:/export/home/sb93797/source/ure.m130/UNOTest/
>
>   [EMAIL PROTECTED]
>    file:/usr/java/jre1.5.0_03/lib/ext/dnsns.jar
>    file:/usr/java/jre1.5.0_03/lib/ext/sunpkcs11.jar
>    file:/usr/java/jre1.5.0_03/lib/ext/sunjce_provider.jar
>    file:/usr/java/jre1.5.0_03/lib/ext/localedata.jar
>
>   null
>
> reveals that the class is already loaded by the AppClassLoader (not
> through a JAR, but directly from the file system hierarchy), which is
> too deep to know ridl.jar.  Thus, the workaround should be to compile
> the class files to some other place than "-d .", so that regcomp won't
> find them by mistake via the AppClassLoader.

Ok, I modified my makefile to put my sources in an other place and it works.
That's so tricky that I don't know how I'ld have done this without you ;)

>(If you fix that, you will
> find out that regcomp still does not succeed, this time because the
> MyMain class is not public...)

Your right, I forgot this problem (developping with VI is much harder than with
Eclipse... or NetBeans)

>
> What this also shows is that the -classpath argument to regcomp is
> effectively ignored, and that regcomp starts the JVM with an
> AppClassLoader that looks into the current directory.  You can file me
> an issue for that.

ok, your login is sb, isn't it ?

Cedric


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

Reply via email to