| View previous topic :: View next topic |
| Author |
Message |
olf Newbie

Joined: 17 Apr 2006 Posts: 4
|
Posted: Sun Apr 23, 2006 9:52 am Post subject: BootstrapException: No office executable found in debian |
|
|
Hi all,
since a couple of hours I am trying to run one of the examples from the openoffice-sdk in Debian Linux.
I am running a Linux Kernel 2.6.12-1-k7 with OpenOffice.org 2.0.2-2. I think I alread read most of the threads I could find about this problem and combined the suggested solutions to the following script:
| Code: | export OOO_LIBS="/usr/lib/openoffice/program/classes"
export CLASSPATH=".:$OOO_LIBS/juh.jar:$OOO_LIBS/jurt.jar:$OOO_LIBS/ridl.jar:$OOO_LIBS/unoil.jar:$OOO_LIBS/sandbox.jar"
export PATH="/usr/local/lib/j2sdk1.4.2_06/bin/:/usr/lib/openoffice/program/:$PATH:."
export LD_LIBRARY_PATH="/usr/lib/openoffice/program/"
export OFFICE_HOME="/usr/lib/openoffice/program/"
soffice "-accept=socket,port=8100;urp;" &
sleep 10
javac -classpath $CLASSPATH $1.java && java -Dcom.sun.star.lib.loader.unopath="/usr/lib/openoffice/program" -cp $CLASSPATH $1 |
however when I try to call run the program I get the following error:
| Code: | $ bash compile.sh FirstUnoContact
com.sun.star.comp.helper.BootstrapException: no office executable found!
at com.sun.star.comp.helper.Bootstrap.bootstrap(Bootstrap.java)
at FirstUnoContact.main(FirstUnoContact.java:8) |
soffice is in the path, it is starting without any problems but unfortunately the executable is not found by the java application. Do you have any idea how to fix this problem?
TIA, Olf |
|
| Back to top |
|
 |
hernad Newbie

Joined: 27 Apr 2006 Posts: 2
|
Posted: Thu Apr 27, 2006 4:45 am Post subject: Re: BootstrapException: No office executable found in debian |
|
|
I have the same problem with ubuntu/dapper, openoffice 2.0.2.
which returns soffice executable
| Code: |
$ which soffice
=> /usr/lib/openoffice/program/soffice
|
|
|
| Back to top |
|
 |
hernad Newbie

Joined: 27 Apr 2006 Posts: 2
|
Posted: Thu Apr 27, 2006 6:38 am Post subject: Re: BootstrapException: No office executable found in debian |
|
|
After digging through openoffice.org-dev packag, especially example /ProfUNO/SimpleBootstrap_java, I have understand what is the catch. Don't run class directly - we should run Loader class. This modified compile.sh works for me:
| Code: |
export OOO_LIBS="/usr/lib/openoffice/program/classes"
export CLASSPATH=".:$OOO_LIBS/juh.jar:$OOO_LIBS/jurt.jar:$OOO_LIBS/ridl.jar:$OOO_LIBS/unoil.jar:$OOO_LIBS/sandbox.jar:$OOO_LIBS"
export PATH="/usr/local/lib/j2sdk1.4.2_06/bin/:/usr/lib/openoffice/program/:$PATH:."
export LD_LIBRARY_PATH="/usr/lib/openoffice/program/"
export OFFICE_HOME="/usr/lib/openoffice/program/"
export OFFICE_PROGRAM_PATH=/usr/lib/openoffice/program
javac -classpath $CLASSPATH $1.java
java -Dcom.sun.star.lib.loader.unopath="$OFFICE_PROGRAM_PATH" -cp $CLASSPATH com.sun.star.lib.loader.Loader $1
|
Main diferences between your and mine scripts are:
* class path is appended with openoffice java class dir - /usr/lib/openoffice/program/classes
* main class is: com.sun.star.lib.loader.Loader, and our application is the argument to that class
I hope this will be helpfull
Regards,
Ernad |
|
| Back to top |
|
 |
olf Newbie

Joined: 17 Apr 2006 Posts: 4
|
Posted: Mon May 01, 2006 12:15 pm Post subject: Re: BootstrapException: No office executable found in debian |
|
|
Hi Ernad,
thank you very much - this was a great help! It is now working quite well
... but I know why I prefer Perl over Java: It is easier to write a program in Perl than to compile one in Java
Best regards,
Olf |
|
| Back to top |
|
 |
|