summaryrefslogtreecommitdiff
path: root/stoc/source
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2023-07-30 19:46:02 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2023-07-31 16:46:12 +0200
commitdbe0ad486c60bde96b7f8019f31d855e3eae545b (patch)
tree0209b83fb69cb8893b237b624077f4843b951778 /stoc/source
parent6f0238a2b076afb5438b61553dc92c6f68d67faa (diff)
tdf#156161: Honor "DontEnableJava" when failed because selected JRE uninstalled
Change-Id: Id90f530fda9e565a5a53853a3acb8195035a80ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155078 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'stoc/source')
-rw-r--r--stoc/source/javavm/javavm.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx
index 96fdd61401fc..305ebe290d34 100644
--- a/stoc/source/javavm/javavm.cxx
+++ b/stoc/source/javavm/javavm.cxx
@@ -690,6 +690,9 @@ JavaVirtualMachine::getJavaVM(css::uno::Sequence< sal_Int8 > const & rProcessId)
}
}
+ if (comphelper::IsContextFlagActive("DontEnableJava"))
+ return css::uno::Any();
+
//Error: %PRODUCTNAME requires a Java
//runtime environment (JRE) to perform this task. The selected JRE
//is defective. Please select another version or install a new JRE