I am writing a OpenOffice extension which is supposed to interact with a large .NET library. As suggested here, a plausible solution is to use IKVM.NET with the extension written in Java which interacts with the Mono library. Yet, the question is, how to introduce IKVM.NET as the JRE for OpenOffice.
Asked
Active
Viewed 422 times
1 Answers
1
I think this is not possible without recompiling OpenOffice. OpenOffice has a very strong Java VM check. If you want do it then you need:
- Rename or copy ikvm.exe to java.exe.
- do the equals changes from this fix checkin for Java 7 with the settings of IKVM. The vendor is "Jeroen Frijters". The current ikvm has the version 1.7.0. Then rebuild OpenOffice or LibreOffice.
- Then enter the path of the IKVM bin parent directory in the menu Tools - Options - OpenOffice.org - Java
Alternative you can change the vendor of IKVM to "Oracle Corporation" and rebuild it.
But I have no idea how this should work with mono.

Horcrux7
- 23,758
- 21
- 98
- 156
-
Thanks. It was really a good heads-up. In fact, there's no need to recompile the whole OpenOffice. The checking is done by `sunjavaplugin.so` (`sunjavaplugin.dll` in Windows) which in turn uses `javavendors.xml` and I only had to patch these two files to let OpenOffice recognize "Jeroen Frijters" as a new vendor. On the other hand, OpenOffice uses `JREProperties.class` to extract vendor properties (like `java.vendor`, `java.version` and `java.home`). A simpler way might be just to patch `JREProperties.java` to misinform OpenOffice whenever the vendor is "Jeroen Frijters". – Mohammad Hedayati Jan 23 '13 at 08:34
-
Yet, `JNI_CreateJavaVM` is not implemented in IKVM.NET and (if I'm right) it cannot be used as the JRE for OO. – Mohammad Hedayati Jan 23 '13 at 15:38
-
I does not know what you means. It seems me that java.exe is calling. Why there is a CreateJavaVM needed? You should contact the mailing list. There are better experts. – Horcrux7 Jan 31 '13 at 19:54