0

I'm making a first foray into UNO and after failing in my main attempt (bootstrapper issues) I've gone right back to basics and I'm trying to follow the beginners guide

https://wiki.openoffice.org/wiki/Documentation/DevGuide/FirstSteps/First_Contact#AntBuildScript

I am running Java on eclipse on Windows 7 64 bit. I have modified the build.xml for Windows (and Office 4) and although I'm no expert I think I've done it successfully - the application builds and tries to run.

Initially I got an error -

Exception in thread "main" java.lang.UnsatisfiedLinkError: no unowinreg in java.library.path

I copied unowinreg.dll from the sdk to the system32 folder and now I get this error

unowinreg.dll: can't load ia 32-bit .dll on a amd 64-bit platform

I can't find anything on this error since 2012 but I'm assuming there must be a way to run uno api on windows 64 ? The sdk I downloaded is 4.1.1 so it is current. Am I using an old approach and need to try something different or ?!

Thanks.

gringogordo
  • 1,990
  • 6
  • 24
  • 60
  • http://forum.lwjgl.org/index.php?topic=3585.0 – Jordi Castilla Apr 08 '15 at 08:48
  • Thanks for that. Have you used this? I just wondered if it would work as the unowinreg.dll is a 32 bit dll and this seems to be the issue (so wouldn't it end up opening it as 32 bit anyway ?). The other question, probably foolish, is does this mean I would have to locate the uno jar which loads the dll, add this code and rebuild the jar (as I'm not calling the dll myself) ? gulp... – gringogordo Apr 08 '15 at 10:29
  • Actually I missed a post I found later which would have answered my question. https://forum.openoffice.org/en/forum/viewtopic.php?f=44&t=75056it . I realise to the more advanced programmers with bigger requirements than I have, the above is probably very useful but for me & my fairly small requirement I think it just means - find another tool (I've seen Jasper reports mentioned a few times in this context). As a bit of a softy I'm quite surprised there isn't a 64 bit version but seeing as I'm not going to spend my time trying to code it I guess guess I can't complain! – gringogordo Apr 08 '15 at 16:31
  • nice to hear! Consider answering your own question for other users!! :) – Jordi Castilla Apr 08 '15 at 16:33
  • 1
    Will do. I'll leave this open for a couple of days in case I've got the wrong end of the stick (again!) and someone answers to the contrary but otherwise I'll add an answer in to the effect that there is no straightforward 64 bit version of Open Office/uno. Not that it's an intelligent answer but I wish I'd found that in straight forward language before I spent time tying to get it to work. Thanks again. – gringogordo Apr 08 '15 at 16:37

1 Answers1

1

Just for reference for anyone else (feel free to correct this if it's wrong).

OpenOffice/UNO is 32 bit and there is no straightforward way to use incorporate it in Java apps developed and running on Windows 64 bit (as of OO 4.1.1). Looking around there seems to be a way of loading the dll (for example see comment by Jordi forum.lwjgl.org/index.php?topic=3585.0) but this looks too complex for my current level of understanding and I suspect it requires some pretty advanced knowledge (again correct me if I'm wrong).

In the end I have gone back to using Jasper (Jaspersoft studio). Which allows saving in odt format.

This isn't a very clever answer but I hope this saves someone some as I didn't find it clear from my initial searches that using open office in a java app on 64 but windows would be a major piece of work.

gringogordo
  • 1,990
  • 6
  • 24
  • 60