No office executable found! Error still exist after adding/OpenOffice. org3/program to classpath

Source: Internet
Author: User
Tags java se
Follow the OpenOffice developer's Guide to implement the first OpenOffice example:Firstunocontact, the following error occurs,You can
Specified in Guide
,This error should be very common, and the Guide also provides a solution.
If you encounterCom. Sun. Star. Comp. helper. bootstrapexception
Claiming "no office executable found! "You shoshould Add the path to
OpenOffice.org Program folder to the classpath (e.g.../OpenOffice.org
3/Program ).

But at the beginning, I did not solve the problem as described.
In addition, you can use maillist in OpenOffice to find a solution. The following is an email.

However, the problem cannot be solved by email. It took a total of one day to change the settings, and finally solved the problem.
The ide I use is eclipse. The key to solving the problem is to make the following settings:
In eclipse, click Project-> properties in the attribute Setting dialog box, select Java build path on the left, and click the libraries tab on the right,
Click Add external class folder on the right and select the path/usr/lib/OpenOffice. org3/program.
I 'd like to explain the meaning of the solution in the Guide, that is, "add the path to the OpenOffice.org Program folder to the classpath (e.g.../OpenOffice. org3/Program ).
Add the path of OpenOffice. org3/program to classpath.
I have been trying to add this path to/etc/profile,/etc/bashrc,/root/. bashrc (I log on as root), but it always does not work.
Currently, OpenOffice. org3/program is directly specified in Eclipse project settings as class folder.


Certificate -------------------------------------------------------------------------------------------------------------------------------------
Email:

Hi, Bernd, thanks for your two suggestions, but error still there.
According to your two suggestion, following is what I did
Firstly, I have added following setting in/etc/profile,/etc/bashrc,/root/. bashrc
Export java_home =/usr/Java/jdk1.6.0 _ 20
Export
Classpath =.: $ java_home/lib/dt. jar: $ java_home/lib/tools. jar:/usr/lib/OpenOffice. org3/Program/
Export Path =.: $ path: $ java_home/bin

Seondly, I run the program in Eclipse IDE, choose run-> Run as Java application.
And in the project-> properties-> JAVA build path-> libaries, there are JRE System
Library [Java SE 1.6]
And OpenOffice.org libraries [SDK 3.2.1] which contains following jars:
Unoil. Jar/opt/openoffice.org/basis3.2/program/classes
Juh. Jar/usr/lib/openoffice.org/ure/#/java
Jurt. Jar/usr/lib/openoffice.org/ure/#/java
Ridl. Jar/usr/lib/openoffice.org/ure/#/java

Any other ideas?
Thanks.


On Jun 18,201 0 pm, Bernd Eilers wrote:
Bytes -----------------------------------------------------------------------------------

Hi Xiaofeng,

Well you did try to execute an "Echo $ classpath" in the shell and are
Sure the setting done in/etc/profile is really still there and not
Accidently being overwritten by some other code in $ home/. bashrc
Example, did you?

Did you try to call the programm by using Java from the CommandLine or
Did you try to start it from within the IDE. If later is the case
IDE has most likely its own Java classpath settings for IDE Projects
Somewhere in the project settings which might override your classpath
Environment variable setting.


Kind regards,
Bernd Eilers

Xiaofeng08@iscas.ac.cn wrote:
> Hi, oo folks,
>
> I tried to run the firstunocontact example in the 'getting started' section
> OpenOffice.org developer's guide, but got the common error:
>
> Encounter a com. Sun. Star. Comp. helper. bootstrapexception claiming "no office
> Executable found! "
>
> The solution gave in the Guide is to add the path to the OpenOffice.org Program
> Folder to the classpath (e.g.../OpenOffice.org 3/Program /).
>
> I added/usr/lib/OpenOffice. org3/program at the end of my/etc/profile, like
Following:
> Export java_home =/usr/Java/jdk1.6.0 _ 20
> Export
> Classpath =.: $ java_home/lib/dt. jar: $ java_home/lib/tools. jar:/usr/lib/OpenOffice. org3/Program/
> Export Path =.: $ path: $ java_home/bin
>
> I logout and login again to enable the/etc/profile, but still got this error when I
> Tried to run firstunocontact again.
>
> My platform is fedora 12, my ide is eclipse, and I have done all the steps listed
> In the Guide and every steps goes fine.
>
> SO, can anybody please give a suggestion?
>
> Thanks.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.