Bug 88023 - Unnessessary JRE-Warning -please remove
Summary: Unnessessary JRE-Warning -please remove
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: x86 (IA32) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:5.3.0
Keywords:
Depends on:
Blocks: Java-Runtime-JRE-Warnings
  Show dependency treegraph
 
Reported: 2015-01-04 16:06 UTC by Thomas Krumbein
Modified: 2023-09-27 16:14 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Picture of missing JRE warning (74.12 KB, image/png)
2015-01-04 16:06 UTC, Thomas Krumbein
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Krumbein 2015-01-04 16:06:02 UTC
Created attachment 111728 [details]
Picture of missing JRE warning

Trying to assign a action to an event for dialog-controls and using the "macro.." button, you will get a warning of missing JRE.
This is missleading - no JRE is nessessary to fullfill the action.

So - please remove this warning!

Warning will pop up every time, you assign an action to an event!

To reproduce the error:
Create a new dialog in basic-IDE - assign a control-element (f.e. an Pushbutton), 
try to assign an action - (select "macro..") - the warning will appear.

Click on OK - and you can work as expected. Everything works fine - no JRE is nessessary.

My Hardware: 
New Computer with Windows 8.1 - no JRE installed.
Comment 1 Joel Madero 2015-01-04 16:27:30 UTC
JRE is necessary for some components in LibreOffice (most notably databse). The warning is not superfluous. Adding triggers for when to show the message vs. showing it one time is a pain...closing as WONTFIX.

FWIW: We are slowly trying to purge JRE completely, so at some point, JRE might actually be unnecessary to run every component in LibreOffice
Comment 2 Michael Stahl (allotropia) 2015-04-30 12:17:16 UTC
there are some JRE based script providers: JavaScript, BeanShell
and "Java" - not sure what the latter is actually.

the problem is, if you click on the macro tab we need to
find out if there are any events configured with
any of the existing script providers, so we need to load the
script provider, and to do that for the JRE based ones
we need the JRE.

there's a bit of a question of whether anybody actually
uses the JRE based script providers - probably not,
so there was an idea to remove them from the product
and into a (non-bundled) extension, but nobody had time
to work on that so far.
Comment 3 Mike Kaganski 2016-11-03 10:05:14 UTC
Hm. Closing WONTFIX a reasonable request? Just because someone thinks that there's no resources, in a community that relies upon attracting new volunteers for fixing what matters to them?

The message is shown from stoc_javavm::JavaVirtualMachine::getJavaVM(const com::sun::star::uno::Sequence<signed char> & rProcessId) in stoc/source/javavm/javavm.cxx. There's a switch that discriminates against reason to call (e.g., JFW_E_JAVA_DISABLED).
It calls bool askForRetry(css::uno::Any const & rException), that shows the message.

It is possible to make minimal changes in any of these to silence the message either for a specific switch or universally based on a LO setting, e.g. after shown once. It is not such pain, actually, it's an easyhack.

Reopening.
Comment 4 Mike Kaganski 2016-11-03 12:59:41 UTC
A patch is submitted for review: https://gerrit.libreoffice.org/30529
It makes the warning to only appear once per LO session, making relevant fields static.
Comment 5 Commit Notification 2016-11-08 07:54:19 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

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

tdf#88023: Only warn about unavailable JRE once

It will be available in 5.3.0.

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.