引导欧诺API LibreOffice的例外 [英] Bootstrap Uno API LibreOffice exception

查看:794
本文介绍了引导欧诺API LibreOffice的例外的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用下面的代码:

static void Main()
{
    try
    {
        var context = uno.util.Bootstrap.bootstrap();
    }
    catch (Exception ex)
    {
       Console.WriteLine(ex.toString());
    }
}



我可以开始的LibreOffice的作家。这能与4.4.4版本,但在安装版本5.0.0,并与新的SDK后 Bootstrap.bootstrap()抛出异常:

外部组件已引发异常

有没有人面临同样的问题,或者一些解?
(.NET 4.0,Windows 7的64位的LibreOffice 5.0精简版)

Has anyone faced the same problem or some solution? (.NET 4.0, Windows 7 64-bit, LibreOffice 5.0 Lite)

推荐答案

我已成功地解决了通过运行soffice.exe服务器为以下值之前设置UNO_PATH环境变量的问题:

I have managed to solve the problem by setting the UNO_PATH environment variable before running soffice.exe server to the following value:

C:\Program Files (x86)\LibreOffice 5\program

这是必需的,因为LibreOffice的5的程序目录中没有URE 子目录了(以前版本),这是需要UNO层。

This was required because LibreOffice 5's program directory does not have "URE" subdirectory anymore (previous versions did) which is required for UNO layer.

这篇关于引导欧诺API LibreOffice的例外的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆