Skip to content

Commit

Permalink
Use toplevel LibO dir for APPLICATION_HOME_KEY
Browse files Browse the repository at this point in the history
Align OfficeLoader with rest of codebase, append program/
instead of expecting it as part of APPLICATION_HOME_KEY

This fixes #11.
  • Loading branch information
Thorsten Behrens authored and Thorsten Behrens committed Jul 4, 2016
1 parent 8867a65 commit f37f9fa
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/calc/Snippet15.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

public class SimpleCalcTest {

private final static String OPEN_OFFICE_ORG_PATH = "/usr/lib64/libreoffice/program";
private final static String OPEN_OFFICE_ORG_PATH = "/usr/lib64/libreoffice";
public static HashMap<String, String> configuration = new HashMap<String, String>();
static {
configuration.put(IOfficeApplication.APPLICATION_HOME_KEY, OPEN_OFFICE_ORG_PATH);
Expand Down
2 changes: 1 addition & 1 deletion src/Lo4ConnectionTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

public class Lo4ConnectionTest {

private final static String LIBREOFFICE_PATH = "/usr/lib64/libreoffice/program";
private final static String LIBREOFFICE_PATH = "/usr/lib64/libreoffice";
public static HashMap<String, String> configuration = new HashMap<String, String>();
static {
configuration.put(IOfficeApplication.APPLICATION_HOME_KEY, LIBREOFFICE_PATH);
Expand Down
4 changes: 3 additions & 1 deletion src/ag/ion/bion/officelayer/util/OfficeLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,9 @@ private static void callUnoinfo(String path, ArrayList<URL> urls) {
Process p;
try {
p = Runtime.getRuntime().exec(
new String[] { new File(path, "unoinfo").getPath(), "java" });
new String[] {
new File( new File(path, "program"),
"unoinfo").getPath(), "java" });
} catch (IOException e) {
System.err.println(
OfficeLoader.class.getName() + "::getCustomLoader: exec" +
Expand Down

0 comments on commit f37f9fa

Please sign in to comment.