OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

BootstrapException: No office executable found in debian

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
olf
Newbie
Newbie


Joined: 17 Apr 2006
Posts: 4

PostPosted: Sun Apr 23, 2006 9:52 am    Post subject: BootstrapException: No office executable found in debian Reply with quote

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
View user's profile Send private message
hernad
Newbie
Newbie


Joined: 27 Apr 2006
Posts: 2

PostPosted: Thu Apr 27, 2006 4:45 am    Post subject: Re: BootstrapException: No office executable found in debian Reply with quote

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
View user's profile Send private message
hernad
Newbie
Newbie


Joined: 27 Apr 2006
Posts: 2

PostPosted: Thu Apr 27, 2006 6:38 am    Post subject: Re: BootstrapException: No office executable found in debian Reply with quote

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
View user's profile Send private message
olf
Newbie
Newbie


Joined: 17 Apr 2006
Posts: 4

PostPosted: Mon May 01, 2006 12:15 pm    Post subject: Re: BootstrapException: No office executable found in debian Reply with quote

Hi Ernad,

thank you very much - this was a great help! It is now working quite well Very Happy

... but I know why I prefer Perl over Java: It is easier to write a program in Perl than to compile one in Java Twisted Evil

Best regards,

Olf
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group