[api-dev] Re: please advise: ooobean
Thanks for answering/Hi, the windows version of my app does not work. I would use custom classloader approach. OK, lets go for it. problem is how does Java locate the JARs (its not only officebean.jar).Also the officebean.jar must be located first. In the SDK there should be an example of an example of a custom classloader, that can be used by the application and which can then load the officebean, etc. I grepped through the SDK, just for me to know I'm after the right thing, do you mean the UnoLoader docs/java/ref/com/sun/star/lib/unoloader/UnoLoader.html? Do you remeber anything I could grep for to find this example? kind regards, Jochen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[api-dev] please advise: ooobean
Hi, ooobean is great, I use it in a small project (gnuaccounting.sf.net), but I have a problem: my app only works when ooobean.jar is in the classpath. I can't deploy ooobean.jar with my application because it uses relative paths to the installed openoffice. I can't use sth. like a custom OOoconnection because this would require a started OO instance with a customized config. 1) Is there any way to start a standard openoffice instance (without changing the config) from a custom directory, something like like startOOoConnection('file:///usr/local/lib/ooo-2.0')? 2) if not, how hard would it be to patch ooo to support something like this? Would one have chances to get this upstream? 3) would this violate any design issues, e.g that a ooo 2.0.3 officebean could or should not connect to 2.0.2 libraries (.so/.dlls)? 4) how else could this be done? As far as I understood a classloader would be tedious(?), so i currently use a starter. This starter basically executes java -cp your openoffice location mainclass (is there any way to tell a running jre to change classpath or start another instance with another cp?) and interestingly is currently the reason why the windows version of my app does not work. 5) I'd like to keep this thing as multiplattform as possible, that's e.g. the reason why I don't just bundle it with windows-portableopenoffice so: how would you do that? thanks a lot and kind regards, Jochen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[api-dev] Re: OOoBean
Hi Simon, and thanks for your answer and the classloader-sample-code, normally if you have the oo-jars (all from oo-home/program/classes) in your classpath (manifest or CLASSPATH or with the -cp switch) the libraries are found. There is a helüper-class, which load the If you want to deploy your application together with the oo-jars (in a relative subdirectory) the native-libraries cannot be found. OK If I understand you correct and you want to deploy your application (some mails above on this list) on different systems and OS. You have to find a way to set the correct-classpath and native-ölibrary-path on the target system. OK. That's what I want to do; deploy my application (if possible as a single java JAR) to users which use different OSses and have their OOs in different locations. I do not need to have officebean.jar in my JAR, but I'll explain why that would have helped in the next paragraph. I won't do it, anyway, because this obviously is not the way it's ment to be. You can use start-scripts (run.bat run.sh) which create a classpath and launch your application with java -cüüp mypath my.package.Main. But the users have to set the OO-path by hand before. In this case you cannot use a selfstarting jar. OK. Additionally, I can not use a selfstarting JAR if I do not have a classloader or a launcher application that changes the JAR-Manifest according to the user's OO-location because a java -jar-Application won't react on the -cp-Argument nor or the CLASSPATH-environment. (http://java.sun.com/j2se/1.4.2/docs/tooldocs/findingclasses.html, The JAR archive specified by the -jar option, which overrides all other values. If this option is used, all user classes come from the specified archive.) You can develop your own Launcher and add the oo-jars from the target-system to your application. Example: ... On the windows-platform you will get problems if the oo-home/program directory is not int the %PATH%. You can preload the native-libs, but you need the right order of the libs and this can simple changed by newer OO-releases. Do you mean this order can change in a newer OO-release or this problem can be resolved by using a newer OO-release? I hope this can help. very much, thank you - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]