Bug 50584 - LibreOffice says that Java runtime JRE 1.7 on Windows is defective
Summary: LibreOffice says that Java runtime JRE 1.7 on Windows is defective
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Documentation (show other bugs)
Version:
(earliest affected)
3.5.4 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Andras Timar
URL: http://bugs.sun.com/bugdatabase/view_...
Whiteboard: target:3.7.0 target:3.6.2 target:3.5.7
Keywords:
: 47177 50254 50371 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-06-01 06:31 UTC by Pedro
Modified: 2012-12-12 21:24 UTC (History)
12 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pedro 2012-06-01 06:31:42 UTC
Version 3.5.4 of LibreOffice announces its compatibility with Java 7. In fact it works perfectly with Java 1.7.4. However, the LibbreOffice Help is not, because when you try to find any item in the help database an error message appears saying that the Jave version is corrupted. It is the same error message that appeared when using LibreOffice 3.5.3 with Java 7.
Comment 1 Andras Timar 2012-06-19 01:32:09 UTC
On one hand it is true. On the other hand, LibreOffice 3.6 does not need Java for help indexing and free text search. So this bug is getting less important.

I added sberg and caolan to cc, they worked on enabling Java 1.7.
Comment 2 Michael Stahl (allotropia) 2012-07-18 12:55:32 UTC
i have found out why JRE 7 does not work for some people:

LO wants to dlopen (or whatever the Win32 equivalent is) "jvm.dll",
which requires "msvcr100.dll"; the JDK contains several copies of
this library, but none in the same directory as jvm.dll
(which is inside a "client" subdirectory).

if the MSVC runtime is not installed globally in the system,
then the dlopen will fail, and the result is an error message
complaining about a "defective" Java runtime.

there are two options to work around this defect in the JRE:

1. bundle the msvcr100.dll, and install it either in "program"
   or globally in the system, so that the runtime loader finds it
2. depending on the selected JRE, set PATH variable to include
   the JRE directory in which the msvcr100.dll is located

currently it looks like bundling is the easier to implement option,
i'll paste some discussion from IRC:

<sberg> mst__, on Unix, we could fix this with javaldx (which came into being to fix a similar problem, that by now should be fixed in the JRE -- and that indeed took years), but on Windows...
<sberg> mst__, then maybe old JRE versions had the same bug (but used msvcr90.dll instead) and that went unnoticed as we include msvr90.dll in the program dir, anyway (we still do, don't we?)
<mst__> sberg, what's the problem with setting $PATH?
<sberg> mst__, set it where?
<sberg> mst__, and to what value?
<mst__> sberg, that's the question :) i have no idea how that could work, perhaps in soffice.exe?
<sberg> mst__, but it's also needed for other processes that can spawn jvm (like uno.exe), so it easily gets messy
<mst__> sberg, is it possible to find out in these soffice.exe etc. what JRE is configured? and is switching JREs supposed to work without restart?
<sberg> mst__, "finding out what JRE is configured": that's what javaldx does, and its (sort of) a mess, Jochen always did the work on that, so I'm not too sure about the details, but it's not nice; switching JREs w/o restart is not supposed to work
<sberg> mst__, so if we can bundle msvr100.dll and install it globally, like we already do for mscvr90.dll, I would very much favor that as a fix
Comment 3 Michael Stahl (allotropia) 2012-07-18 16:25:35 UTC
i've filed a JRE bug about this (see URL),
thought the mail i received says that it may only be viewable
by the public in 1-2 days
(and indeed it currently says "This bug is not available.")
Comment 4 Not Assigned 2012-07-18 19:58:26 UTC
Andras Timar committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=8b749cb16dde14b199a61456741b586ddd88a584

fdo#50584 bundle MS Visual C++ 2010 Runtime so LO can work with JRE7
Comment 5 Andras Timar 2012-07-18 20:28:23 UTC
I tested the patch above, and it worked under Windows 7 with JRE7u5.
Comment 6 Michael Stahl (allotropia) 2012-07-19 13:03:36 UTC
*** Bug 50371 has been marked as a duplicate of this bug. ***
Comment 7 Julien Nabet 2012-08-29 10:40:49 UTC
Reading this thread http://nabble.documentfoundation.org/Libreoffice-and-Java-tp4003369.html, I made a research about java 1.7 related LO bugs.
When I read this tracker, I wonder:
- Do fdo#47177 and fdo#46422 would be dups of this one?
- Could the Andras' fix be backported to 3.6 and 3.5 branches?
Comment 8 starmatz71 2012-08-31 17:45:06 UTC
I confirm: This bug is still present in LibreOffice V3.6.1.2 in WindowsXP.

In LibO3.5.6.2 there is no java bug message and the wizard is visible!
I'm sure this bug was present in 3.5.4.2.
I'm not sure if this was in 3.5.5.3.


Can someone find out and why this bug appears in the 3.6 series?
Comment 9 Not Assigned 2012-09-10 09:33:43 UTC
Andras Timar committed a patch related to this issue.
It has been pushed to "libreoffice-3-6":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=6a59a378f6d492aad09ae254a024983eb9ee8060&g=libreoffice-3-6

fdo#50584 bundle MS Visual C++ 2010 Runtime so LO can work with JRE7


It will be available in LibreOffice 3.6.2.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 10 Not Assigned 2012-09-10 10:28:38 UTC
Andras Timar committed a patch related to this issue.
It has been pushed to "libreoffice-3-5":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=76876f51796cb10e3b4fbaa7cfaa209ab6b9fd2f&g=libreoffice-3-5

fdo#50584 bundle MS Visual C++ 2010 Runtime so LO can work with JRE7


It will be available in LibreOffice 3.5.7.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 11 Stephan Bergmann 2012-09-24 09:33:39 UTC
*** Bug 47177 has been marked as a duplicate of this bug. ***
Comment 12 Julien Nabet 2012-12-12 21:24:12 UTC
*** Bug 50254 has been marked as a duplicate of this bug. ***