Everything works for me as expected on Windows with only one step:

I have changed the key *office.path to  *C:\Program Files (x86)\OpenOffice
4 in  in *OM->Admin->Configuration*

I never change/recompile jodconverter
I have no time to work on this project :(

On Fri, Jun 23, 2017 at 11:57 AM, Dhawan, Vaibhav (MIND) <
[email protected]> wrote:

> HI Maxim,
>
>
>
> I have installed openoffice 4 and using Windows platform
>
>
>
> 1)      I have changed the key *office.path to  *C:\Program Files
> (x86)\OpenOffice 4 in  in *OM->Admin->Configuration*
>
>
>
> 2)      In my pom.xml file
>
>
>
> <dependency>
>
>                      <groupId>org.artofsolving.jodconverter</groupId>
>
>                      <artifactId>*jodconverter*-core</artifactId>
>
>                      <version>3.0.1-*om*</version>
>
>               </dependency>
>
>
>
>               <dependency>
>
>                      <groupId>org.openoffice</groupId>
>
>                      <artifactId>*juh*</artifactId>
>
>                      <version>4.1.2</version>
>
>               </dependency>
>
>               <dependency>
>
>                      <groupId>org.openoffice</groupId>
>
>                      <artifactId>*ridl*</artifactId>
>
>                      <version>4.1.2</version>
>
>               </dependency>
>
>               <dependency>
>
>                      <groupId>org.openoffice</groupId>
>
>                      <artifactId>*unoil*</artifactId>
>
>                      <version>4.1.2</version>
>
>               </dependency>
>
>
>
>
>
> I have build and recompiled and have above jars configured in my maven
> project
>
>
>
> 3)  In officeUtils.java inside getDefaultOfficeHome method
>
>
>
>
>
>
>
> *if* (PlatformUtils.*isWindows*()) {
>
>             // %ProgramFiles(x86)% on 64-bit machines; %ProgramFiles% on
> 32-bit ones
>
>             String programFiles = System.*getenv*("ProgramFiles(x86)");
>
>             *if* (programFiles == *null*) {
>
>                 programFiles = System.*getenv*("ProgramFiles");
>
>
>
>             }
>
>
>
>             *return* *findOfficeHome*(programFiles + File.*separator* + 
> "OpenOffice
> 4");
>
>                 //programFiles + File.separator + "LibreOfficeDev 5"
>
>
>
>         }
>
> In the above code when debugger returns *findOfficeHome*(programFiles +
> File.*separator* + "OpenOffice 4") and calls
>
> *private* *static* File findOfficeHome(String... knownPaths) {
>
>         *for* (String path : knownPaths) {
>
>             File home = *new* File(path);
>
>             *if* (*getOfficeExecutable*(home).isFile()) {
>
>                 *return* home;
>
>             }
>
>         }
>
>         *return* *null*;
>
>     }
>
> *In knownPaths the debug shows same old path *[C:\Program Files
> (x86)\OpenOffice.org 3, C:\Program Files (x86)\LibreOffice 3]
>
> As a result the above method returns *nul*l.
>
>
>
> Please assist me why the knownPath is taking *same old path* and not
> taking current path of OpenOffice 4
>
>
>
>
>
> Thanks,
>
> Vaibhav dhawan
>
> *[image: cid:[email protected]]*
>
> ------------------------------
>
> The information contained in this electronic message and any attachments
> to this message are intended for the exclusive use of the addressee(s) and
> may contain proprietary, confidential or privileged information. If you are
> not the intended recipient, you should not disseminate, distribute or copy
> this e-mail. Please notify the sender immediately and destroy all copies of
> this message and any attachments. WARNING: Computer viruses can be
> transmitted via email. The recipient should check this email and any
> attachments for the presence of viruses. The company accepts no liability
> for any damage caused by any virus/trojan/worms/malicious code transmitted
> by this email. www.motherson.com
>



-- 
WBR
Maxim aka solomax

Reply via email to