Bug 38046 (Java-Runtime-JRE-Warnings) - [META] False "Libreoffice requires a Java runtime environment (JRE)" warnings
Summary: [META] False "Libreoffice requires a Java runtime environment (JRE)" warnings
Status: NEW
Alias: Java-Runtime-JRE-Warnings
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
6.4.4.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL: https://wiki.documentfoundation.org/F...
Whiteboard:
Keywords:
Depends on: 92153 155668 31269 31354 34809 35769 51036 53446 55233 88023 104929 113413 120362 120363 122315 126643 128010 135462 156161 156701
Blocks: Java-Runtime-JRE
  Show dependency treegraph
 
Reported: 2011-06-07 11:52 UTC by Tim
Modified: 2024-03-08 01:03 UTC (History)
4 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 Tim 2011-06-07 11:52:25 UTC
It is possible to turn off the use of a Java runtime environment in the LibreOffice preferences.

This is done frequently because of startup performance and because Java is often missing on Windows installations (because of maintainability/security considerations, but that's a different story).

I think someone who explicitly unchecks this "Use a Java runtime environment"-checkbox should not be prompted about a missing Java runtime if he/she wants to execute an action that works perfectly without Java, i.e., saving a new Writer document.

I understand that in order to fix this technically correct a lot has to change [1] which will take at least "a while". But because this can be a really annoying and useless warning that keeps coming back and disrupts the user experience, I also want to suggest to implement an option like "Don't show this warning again" in the meantime.

[1] http://openoffice.org/bugzilla/show_bug.cgi?id=37020#c3

ps. I have seen bugs that mention this issue, but they either focus on startup or on first use.
Comment 1 Tim 2011-06-07 12:03:15 UTC
ps2. This is also not about the showing "multiple Java warnings"-issue mentioned in #31354
Comment 2 Don't use this account, use tml@iki.fi 2011-06-07 12:40:43 UTC
To the best of my knowledge, unless you have an extension installed that is implemented in Java (and we don't include any such extension now), the JVM is not started (or attempted to be started) until you invoke some functionality implemented in Java. So the claim of Java affecting startup performance is likely untrue, folklore.
Comment 3 Tim 2011-06-07 12:56:14 UTC
(In reply to comment #2)
> To the best of my knowledge, unless you have an extension installed that is
> implemented in Java (and we don't include any such extension now), the JVM is
> not started (or attempted to be started) until you invoke some functionality
> implemented in Java. So the claim of Java affecting startup performance is
> likely untrue, folklore.

@tor: I tested it quickly on OS X 10.6 with LO 3.3.2 and it looks like you're right. I did not notice any differences in startup time between Java runtime enabled and disabled with this latest stable LO build. Sorry for not testing this again before posting.

The main point of annoying the user with unnecessary warnings and thus disrupting his workflow, still stands unfortunately.
Comment 4 Björn Michaelsen 2011-12-23 12:25:32 UTC Comment hidden (obsolete)
Comment 5 Tim 2012-01-16 12:46:26 UTC
The Java popup still appears with LO 3.4.5 and OS X 10.7 if you click on the document right after startup.

I also gave 3.5.0b3 a quick look and could not trigger the dialog right after startup. Though a longer session in 3.5 is needed to make sure this popup has really been removed (or maybe the developer involved in removing this dialog in 3.5.0b3 could give some insight).
Comment 6 Tim 2012-01-16 12:57:38 UTC
small correction, the dialog in question is not triggered in 3.4.5 after a first click after startup on a document, but after you typed the first letter.
Comment 7 Roman Eisele 2012-08-18 10:14:20 UTC
This is a very useful meta-bug to keep track of all the different bug reports about false/unnecessary "Libreoffice requires a Java runtime environment (JRE)" warnings. Thank you for creating it!

However, other meta-bugs (or task bugs) use "Depends on"/"Blocks" the other way around: the particular bug reports "block" the meta/task bug report. This makes much more sense, because it means that as soon as all particular bugs are fixed, the meta-bug is no longer "blocked" and could be closed.

Therefore, and to achieve consistency with all the other meta-bugs (or task bugs), I move all particular bugs from "Blocks" to "Depends on". Thank you for your understanding!
Comment 8 Roman Eisele 2012-08-18 10:17:50 UTC
Added bug 31354 to "Depends on" -- it is already fixed, but it is good to link also fixed particular bugs in a meta-bug, to show the progress made until now.


(In reply to comment #6)
> small correction, the dialog in question is not triggered in 3.4.5 after a
> first click after startup on a document, but after you typed the first letter.

Hint: for this special case we have bug 34809.
Comment 9 Roman Eisele 2012-08-18 10:22:54 UTC
(Removed all three "See Also" links, because all these bugs are now listed in the "Depends on" list, and this is how linking such particular bugs is done normally. "See Also" is necessary only for linking external bug reports, and for some special cases.)
Comment 10 Roman Eisele 2012-08-18 10:26:17 UTC
Added bug 51036 - "Prompts to install Java when cutting and pasting on computer without Java installed".
Comment 11 Roman Eisele 2012-08-19 08:28:19 UTC
The component should be just general ("Libreoffice").
Comment 12 Roman Eisele 2012-08-19 08:40:31 UTC
Added bug 53446 - "UI: Wrong message 'JRE required' in FILEOPEN dialog".
Comment 13 kindaian 2012-08-29 15:44:25 UTC
This is still happening on Mac OS X 10.8.1, with Java 1.7.0_06.

Albeit I've installed JDK (and JRE is also there), there is no reason for issuing a JRE warning when a JDK is present.

It's an annoying warning to say the least and breaks workflow and thought process.
Comment 14 kindaian 2012-08-29 15:46:56 UTC
BTW... version 3.6.0.4 of LibreOffice. If you try to copy/past from the "About" it will generate the error/warning.
Comment 15 Roman Eisele 2012-08-31 08:57:13 UTC
Added Bug 31269 - "LibreOffice reports that a JRE is required when closing". This issue seems fixed, but nevertheless I add it here; listing also resolved issues is good to document the progress in this area ;-)
Comment 16 noibsguy 2012-09-05 21:34:33 UTC
To clarify--On Mac OS 10.8.1 and LO 3.6.1.2, if no Java is installed and a text document is opened, the warning dialog box about installing Java pops up when the first character is typed in the document.  Clearly, Java is not needed at that time and therefore there is no reason to pop up that message.

With all the security breaches involving Java, I uninstalled Java from my system, but I reinstalled it because I couldn't stand the message each time I opened and attempted to edit a LO document.  I've disabled Java in my Web browsers so no big deal, but let's get rid of the Java warnings in LO unless Java is actually needed.
Comment 17 Roman Eisele 2012-09-06 07:01:44 UTC
(In reply to comment #16)
> To clarify--On Mac OS 10.8.1 and LO 3.6.1.2, if no Java is installed and a text
> document is opened, the warning dialog box about installing Java pops up when
> the first character is typed in the document.

The same is true on Mac OS X 10.6.8 (probably just with *every* Mac OS version).
Comment 18 Roman Eisele 2012-09-12 13:06:05 UTC
Added bug 53446 - “UI: Wrong message 'JRE required' in FILEOPEN dialog”
Comment 19 Roman Eisele 2012-09-13 07:12:51 UTC
Added “[Task]” tag, because this *is* a task/tracking bug.
Comment 20 Roman Eisele 2012-09-23 18:09:04 UTC
For the record:
Rainer Bielefeld has added bug 55233 -- “FILEOPEN Document causes "Enable JRE" message with disabled Java Runtime Environment”.
Comment 21 QA Administrators 2015-01-05 17:50:55 UTC Comment hidden (obsolete)
Comment 22 Markus 2018-04-09 09:00:45 UTC
We are trying to avoid Java as far as we can.
When deploying LibreOffice 5.4.6.2 we switched off Java in LO Settings and
even didn't install the internal beanshell plugin in LO.

We are using macros, but only LibreOffice Basic ones.

But it's still that when using "Execute Macros" or opening Macro-Window the Message appears "LibreOffice requires Java..."

It totally nonsense that LO is complaining about JAVA if everything is switched off , even the internal LO plugin for Beanshell/JAVA isn't installed.

Is there a way to avoid this "require.." Message ?
It's no solution for us to install Java x32 and x64 (just in case) to quiet LO !
Those JAVA installs need to be updated and patched quite regulary and we want to reduce our security risks.
Comment 23 Bernard Moreton 2018-10-05 09:23:14 UTC
I notice that every time I open libreoffice the java option (Tools,Options,LibreOffice,Advanced "Use a Java runtime environment) resets as checked.  This then generates an error message when LO is called from the command line. 
I've never had Java on the current PC, so why is my un-checked setting not being respected?
LO 6.1.2.1
Ubuntu 18.04.1
Comment 24 calimeroteknik 2019-09-25 08:48:39 UTC
LO 6.2 shows an annoying dialog at each and every startup asking whether I want to enable java, and I've grown tired of answering "no". There seems to be no way to disable this dialog in the preferences.

Note: the part where java is enabled behind my back after I've explicitly set it to "disabled" seems solved for now.
Comment 25 Mike Sapsard 2020-07-11 19:29:21 UTC
Under Tools|Options|Advanced the Use a Java Runtime Environment checkbox has no effect. Whatever is done a 'Select JRE' warning message appears at the next start up.
Comment 26 Timur 2022-07-28 13:31:10 UTC
Is this bug still reproducible with newer LO? 
Please give examples upon which steps you get Java warning. 
I add Wiki page which explained what Java is used for.
Comment 27 Christoph Anton Mitterer 2023-07-22 20:51:12 UTC
Yes. Still an issue as of 7.5.5, and just as annoying as it ever was ;-)

I mean the pop up shows even twice, every start.
Comment 28 Mike Kaganski 2023-09-27 17:07:52 UTC
(In reply to Christoph Anton Mitterer from comment #27)

Over the years, myself and others have fixed most of the cases. The two latest fixes were for Python dialog, caused by some corner cases like uninstalled previously-chosen JRE (tdf#156161, fixed in upcoming 24.2).

But what is most likely for the remaining cases, is probably tdf#122315, where some Java-based extension tries to execute - which is not a bug. If that is the case, the only proper fix is to disable such extensions.

Of course, it could be something still missing. But without the *proper* steps to reproduce (and comment 27 is not such a proper description!), there's nothing to see, and thus to fix. See e.g. the mentioned tdf#122315, where the reported worked hard to allow others to see it; they gave good steps in initial description; when it turned out that it wasn't enough, they came with more details they were able to notice, which finally allowed to repro and fix.
Comment 29 Mike Kaganski 2023-09-27 17:25:12 UTC
(In reply to Mike Kaganski from comment #28)
> See e.g. the mentioned tdf#122315,

Sorry, a thinko - tdf#156161 was meant as a good case of hunting for reproducibility.
Comment 30 Christoph Anton Mitterer 2024-03-08 01:03:15 UTC
Hey Mike.

Sorry, I had somehow missed your reply.


(In reply to Mike Kaganski from comment #28)
> But what is most likely for the remaining cases, is probably tdf#122315,
> where some Java-based extension tries to execute - which is not a bug. If
> that is the case, the only proper fix is to disable such extensions.

Indeed... the offenders were libreoffice-writer2latex and libreoffice-writer2xhtml.

The extensions menu in LO was even showing a small ⚠️ next to those, though with no tool tip or so, which would explain why there's a problem.

In my case, these extensions were installed via a Debian package, so one cannot really disable the for on a per-user basis.


I see why you don't want to classify this as bug, but still ... it would be nice if there was a way to silence the warnings even in that case or perhaps even better:
- let the warning display who is requesting Java (i.e. the extension name or so)
- give some way to let users disable system wide installed extensions

Anyway, from my side, I'd still count this as a "fixed".

btw: Interestingly: as said before, I always got the warning twice. With the new knowledge about the extensions being the cause I thought it would make sense, cause I have two of them.
But even with one removed, I still get two popups.


Thanks,
Chris