Hi-ya,

I am having a bit of a nightmare integrating
OpenOffice and any help would be great. 

Here is the scenario:

I have an eclipse rcp app which uses Plugin A - my
OpenOffice handling code and PlugIn B - My User
Interface code which uses the Swt Bridge, Plugin C -
My OpenOffice "Lib" ie all the classes and dll's, and
other files openoffice needs.

I need to access the Plugin C from my app, without
using the the java.library.path property. OpenOffice
seems to rely heavily on the java.library.path
property, but when I set it at runtime it doesn't seem
to make any difference. This whole thing only seems to
work when the OpenOffice "Lib" is in a subdirectory of
PlugIn A. 

OpenOffice looks for the local library (Windows:
officebean.dll, Unix: libofficebean.so) relative to
the officebean.jar in the <OfficePath>/program
directory. OpenOffice has some special class loading,
which I can't get to work with Eclipse across multiple
plugins.

Does anyone have any pointers how I can this to work? 

many thanks.

Sorry to be so verbose, however I can't find much info
about this. But I found someone who had what sounded
like a similiar problem with a OpenOffice and Java Web
Start (JNLP) Integration. I have copied it below:

Working around this constraint, I created a custom
ClassLoader (subclassing the java.net.URLClassLoader)
which will load all the JARs in the classes folder
(hard code the directory for now). Should work, won't
it? But no. Java Web Start uses a specialised
com.sun.jnlp.JNLPClassLoader, which does not bother
about the system classloader. This is to say that by
loading all the JARs via my custom ClassLoader does
not trigger JNLP's ClassLoader to pick them up. The
result - ClassNotFoundException. 

My next venture is to explicitly set the java.ext.dirs
property via the JNLP file, pointing it to the classes
folder and hoping the system class loaders will
automatically load all the JARs in it. Don't get me
wrong, as this approach works for a stand-alone GUI
application, but when run via Web Start, we now get a
different result - NoClassDefFoundException. 

In a desperate experiment, I tried to force the system
classloader to load these JARs, by force
introspection, using the URLClassLoader's addURL(URL)
method. Since this method is private, I had to use the
reflection API to invoke the method. Improvement here,
as the classes were finally picked up by JNLP, but
then comes a strage error - InvokationMethodException,
with a strange error message - This cannot happen. 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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

Reply via email to