summaryrefslogtreecommitdiff
path: root/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx')
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx12
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)
{