Re: [dev] OpenOffice Integration with Eclipse RCP Application

2006-02-06 Thread Kent Gibson
thanks. 

--- Oliver Brinzing [EMAIL PROTECTED] wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Hi,
 
  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.
 
 some time ago I had a similar problem:
 I tried to use a swt dialog from a oo component ...
 and found the following solution:
 
 First I added the eclipse rcp/swt jar files to the
 oo userClassPath (javasettings_Windows_x86.xml)
 
 userClassPath xsi:nil=false
 

D:\swt.win.runtime\org.eclipse.core.runtime_3.1.0.jar;
 
 D:\swt.win.runtime\org.eclipse.jface.text_3.1.0.jar;
   D:\swt.win.runtime\org.eclipse.jface_3.2.0.jar;
   D:\swt.win.runtime\org.eclipse.osgi_3.1.0.jar;
 

D:\swt.win.runtime\org.eclipse.swt.win32.win32.x86_3.1.0.jar
 /userClassPath
 
 and second I added D:\swt.win.runtime to the
 windows environment Path variable, otherwise
 the native swt dll's (swt-awt-win32-3201.dll,
 swt-win32-3201.dll, swt-gdip-win32-3201.dll) can't
 be
 found ...
 (I had to extract the dlls from the
 org.eclipse.swt.win32.win32.x86_3.1.0.jar file into
 D:\swt.win.runtime)
 
 it seems not to be possible to *extend* the
 java.library.path using the
 -Djava.library.path=D:\swt.win.runtime
 option inside the javasettings_Windows_x86.xml,
 afaik using this option will replace the current
 setting with
 your settings, and thats probably not what you want
 ...
 
 Oliver
 
 - --
 GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06
 4E2C AB40 CFD0 4A45
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.2 (MingW32)
 Comment: Using GnuPG with Mozilla -
 http://enigmail.mozdev.org
 

iD8DBQFD46wLTiyrQM/QSkURAmxLAJ9RBOMo9DjSnw0wgywmocnmGY5V1ACff860
 +UJPqIBmVZhrAnGMcxOSOSA=
 =DSVg
 -END PGP SIGNATURE-
 

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


__
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]



Re: [dev] OpenOffice Integration with Eclipse RCP Application

2006-02-03 Thread Cedric Bosdonnat
Hi,

Kent Gibson a écrit :

 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? 

In the Eclipse plugin for OOo Code support, I used a trickery: I created
 a Java application (packaged in a jar in my plugin) that handled OOo. I
just launched this application with Runtime.exec and the right
environment variables (LD_LIBRARY_PATH on Linux and PATH on Windows).

However, there should be other ways that I'm not aware of. If this
couldn't do your trick, I'm interested in any other solution to
dynmically set the java.library.path variable.

Hope that helps,
Cedric

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



Re: [dev] OpenOffice Integration with Eclipse RCP Application

2006-02-03 Thread Oliver Brinzing
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

 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.

some time ago I had a similar problem:
I tried to use a swt dialog from a oo component ... and found the following 
solution:

First I added the eclipse rcp/swt jar files to the oo userClassPath 
(javasettings_Windows_x86.xml)

userClassPath xsi:nil=false
D:\swt.win.runtime\org.eclipse.core.runtime_3.1.0.jar;
D:\swt.win.runtime\org.eclipse.jface.text_3.1.0.jar;
D:\swt.win.runtime\org.eclipse.jface_3.2.0.jar;
D:\swt.win.runtime\org.eclipse.osgi_3.1.0.jar;
D:\swt.win.runtime\org.eclipse.swt.win32.win32.x86_3.1.0.jar
/userClassPath

and second I added D:\swt.win.runtime to the windows environment Path 
variable, otherwise
the native swt dll's (swt-awt-win32-3201.dll, swt-win32-3201.dll, 
swt-gdip-win32-3201.dll) can't be
found ...
(I had to extract the dlls from the org.eclipse.swt.win32.win32.x86_3.1.0.jar 
file into
D:\swt.win.runtime)

it seems not to be possible to *extend* the java.library.path using the
-Djava.library.path=D:\swt.win.runtime
option inside the javasettings_Windows_x86.xml, afaik using this option will 
replace the current
setting with
your settings, and thats probably not what you want ...

Oliver

- --
GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFD46wLTiyrQM/QSkURAmxLAJ9RBOMo9DjSnw0wgywmocnmGY5V1ACff860
+UJPqIBmVZhrAnGMcxOSOSA=
=DSVg
-END PGP SIGNATURE-

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



[dev] OpenOffice Integration with Eclipse RCP Application

2006-02-02 Thread Kent Gibson
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]