diff options
author | ilhan <ilhanyesil@gmx.de> | 2020-03-25 11:18:09 +0100 |
---|---|---|
committer | Michael Stahl <michael.stahl@cib.de> | 2020-03-27 17:46:51 +0100 |
commit | 6b6af620ff53209487a146aa3977db328c3a6300 (patch) | |
tree | 63d50c383f60b9ba99639300ea551dc0b7862eb3 /jvmfwk/plugins | |
parent | 319407dba6f6bb0343865d010bfd436900ad0f2f (diff) |
tdf#131399 Update java settings after slight java version change
Under linux, the version is now also checked for changes at startup
of libreoffice.
Change-Id: I572f718cf5afc83a70d98a6897f1d3d6877644f7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91037
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Diffstat (limited to 'jvmfwk/plugins')
-rw-r--r-- | jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx index 128de9b352b0..4760ab629313 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx @@ -867,6 +867,18 @@ javaPluginError jfw_plugin_existJRE(const JavaInfo *pInfo, bool *exist) *exist = true; JFW_TRACE2("Java runtime library exist: " << sRuntimeLib); + // Check version + rtl::Reference<VendorBase> aVendorInfo = getJREInfoByPath(sLocation); + if (!aVendorInfo.is()) + { + *exist = false; + JFW_TRACE2("JRE or supported vendor not accessible at location: " << sLocation); + } + else if(pInfo->sVersion!=aVendorInfo->getVersion()) + { + *exist = false; + JFW_TRACE2("Mismatch between version number in libreoffice settings and installed JRE: " << pInfo->sVersion <<" != " << aVendorInfo->getVersion()); + } } else if (::osl::File::E_NOENT == rc_itemRt) { |