按照openoffice developer's guide,实现第一个openoffice 例子:FirstUnoContact,出现了如下错误, 能在
guide中指明 ,这个错误应该是很常见的了,guide中也给出了解决方案。
If you encounter a com.sun.star.comp.helper.BootstrapException
claiming "no office executable found!" you should add the path to the
OpenOffice.org program folder to the classpath (e.g. .../OpenOffice.org
3/program).
但是我一开始时,按照其所述,并没能解决问题。
另外也通过openoffice 的maillist询问解决办法,下面是邮件来往。
但是按照邮件中所做也没能解决问题。总共花了一天时间,不停的更改设置,最终解决了。
我用的IDE是Eclipse,解决问题的关键是做了如下设置:
在Eclipse中,点击Project->Properties在出来的属性设置对话框中,选择左侧的Java Build Path,然后在右边点击Libraries选项卡,
然后点击右侧的Add External Class Folder, 选择路径/usr/lib/openoffice.org3/program
我想guide中给出的解决方案中的含义吧,也即"add the path to the OpenOffice.org program folder to the classpath(e.g. .../OpenOffice.org3/program).
就是说把OpenOffice.org3/program的路径加到classpath中去。
我原来一直试图把这个路径加到/etc/profile, /etc/bashrc, /root/.bashrc(我以root身份登录),但总是不见效。
现在在Eclipse的project settings中直接指定OpenOffice.org3/program作为class folder,才起到了作用。
-------------------------------------------------------------------------------------------------------------------------------------
邮件:
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/share/java
jurt.jar /usr/lib/openoffice.org/ure/share/java
ridl.jar /usr/lib/openoffice.org/ure/share/java
any other ideas?
thanks.
On Jun 18, 2010 11:57 pm, Bernd Eilers wrote:
-----------------------------------------------------------------------------------
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 for
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 the
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 of
> 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.
详细解决方案
no office executable found! error still exist after adding /openoffice.org3/program to classpath
热度:25 发布时间:2024-01-10 10:50:54.0
相关解决方案
- struts2的Action怎么返回指定路径的jsp或html,而不是返回SUCCESS、ERROR
- 'Update Progress' has encountered a problem An internal error has occurred解决方案
- 新手Dialect class not found
- servlet+jquery1.4.2(ajax error?)解决方案
- fatal error; call to a member function query() on a non-object异常求回答啊 php+sqlite
- 【100分】怎么监控多台服务器的log,alert,error
- SOS-(奇怪现象)服务器暂不可用500 internal server error,该怎么解决
- 'Update Progress' has encountered a problem An internal error has occurred解决方案
- object error!
- Syntax error, insert "}" to complete Block,该如何处理
- MyEclipse在jsp文件设置了断点,F6单步调试,总出现_jspService页面,提示:Source not found for XXXX.jsp解决办法
- Error occured during reequest processing: Java heap space,该怎么处理
- out of Memory Error java/lang/OutOfMemortyError,该怎么解决
- eclipse class not found 愁死了解决方法
- java.lang.Error: Unresolved compilation
- 请问用过ksoap的前辈:Error verifying method org/ksoap2/serialization/SoapObject equals(Ljava/lang/Object;)Z
- \nbproject\build-impl.xml:332: Preverification failed with error code 1. 异常
- Error : Invalid path什么回事啊求解决!
- 运作java的时候 出现Error : Invalid path, "C:\Program Files (x86)\Java\jdk1.6.0_21\bin
- Your project contains error(s), please fix them beforerunning your application.该怎么解决
- java窗口helloworld程序为什么窗口中未显示“hello world program"文字
- struts2 action中除了返回SUCCESS ERROR INPUT NONE LOGIN 能自定义返回值以实现更多的转向么?具体应该如何做呢
- websphere5.12 Error 503: Failed to load target servlet [action],该如何处理
- 怎么阻止 exe4j 生成 error.log
- 有人用过zeroMQ吗?一直揭示C:\Program Files\Java\jre6\bin\jzmq.dll: Can't find dependent li
- Server Error in '/' Application.解决方法
- devexpress卸载失败 ERROR 1001解决办法
- 有关问题 "LC.exe not found·" , ·
- 有关问题 "LC.exe not found···" , ······
- devexpress卸载失败 ERROR 1001,该如何解决