diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2009-04-02 16:25:40 +0000 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2009-04-02 16:25:40 +0000 |
commit | 93350f1c4e7940c400b145403e58070a7d873026 (patch) | |
tree | e092953367bd5d4e5c0680ec89865612f4be8ca8 /stoc/source/javavm | |
parent | 423409561c4cb620eeddbc2c5a42154adbd1bb6f (diff) |
CWS-TOOLING: integrate CWS jl119_DEV300
2009-03-13 08:14:58 +0100 jl r269453 : CWS-TOOLING: rebase CWS jl119 to branches/OOO310@269350 (milestone: OOO310:m5)
2009-03-10 16:01:33 +0100 jl r269280 : #i98990# apply patch by jbu: fixing the python script provider
2009-03-10 13:25:02 +0100 jl r269268 : #i93939#
2009-03-10 11:44:07 +0100 jl r269261 : #i93939#
2009-03-09 17:14:58 +0100 jl r269205 : #i93939# choose a different JRE when the selected one was uninstalled
2009-03-09 16:34:34 +0100 jl r269201 : #i93939# choose a different JRE when the selected one was uninstalled
2009-03-05 16:40:16 +0100 jl r268924 : #99618# Do not migrate java settings
2009-02-25 14:29:53 +0100 jl r268439 : #i99618# do not invalidate existing javasettings by using a new date in the update element
Diffstat (limited to 'stoc/source/javavm')
-rw-r--r-- | stoc/source/javavm/javavm.cxx | 33 |
1 files changed, 28 insertions, 5 deletions
diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx index e7c9ff1a5851..8042b70c9dd1 100644 --- a/stoc/source/javavm/javavm.cxx +++ b/stoc/source/javavm/javavm.cxx @@ -881,11 +881,34 @@ JavaVirtualMachine::getJavaVM(css::uno::Sequence< sal_Int8 > const & rProcessId) } case JFW_E_VM_CREATION_FAILED: { - //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 and select it under Tools - Options - - //%PRODUCTNAME - Java. + //If the creation failed because the JRE has been uninstalled then + //we search another one. As long as there is a javaldx, we should + //never come into this situation. javaldx checks alway if the JRE + //still exist. + JavaInfo * pJavaInfo = NULL; + if (JFW_E_NONE == jfw_getSelectedJRE(&pJavaInfo)) + { + sal_Bool bExist = sal_False; + if (JFW_E_NONE == jfw_existJRE(pJavaInfo, &bExist)) + { + if (bExist == sal_False + && ! (pJavaInfo->nRequirements & JFW_REQUIRE_NEEDRESTART)) + { + javaFrameworkError errFind = jfw_findAndSelectJRE( NULL ); + if (errFind == JFW_E_NONE) + { + continue; + } + } + } + } + + jfw_freeJavaInfo(pJavaInfo); + // + //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 + //and select it under Tools - Options - %PRODUCTNAME - Java. css::java::JavaVMCreationFailureException exc( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( |