1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <sal/config.h>
21 #include <sal/log.hxx>
26 #include <rtl/bootstrap.hxx>
27 #include <rtl/ref.hxx>
28 #include <rtl/ustring.hxx>
29 #include <osl/diagnose.h>
30 #include <osl/file.hxx>
32 #include <osl/process.h>
34 #include <osl/thread.hxx>
35 #include <jvmfwk/framework.hxx>
36 #include <vendorbase.hxx>
37 #include <vendorplugin.hxx>
40 #include "framework.hxx"
41 #include <fwkutil.hxx>
42 #include <elements.hxx>
43 #include <fwkbase.hxx>
47 bool g_bEnabledSwitchedOn
= false;
49 JavaVM
* g_pJavaVM
= nullptr;
51 bool areEqualJavaInfo(
52 JavaInfo
const * pInfoA
,JavaInfo
const * pInfoB
)
54 return jfw_areEqualJavaInfo(pInfoA
, pInfoB
);
59 javaFrameworkError
jfw_findAllJREs(std::vector
<std::unique_ptr
<JavaInfo
>> *pparInfo
)
61 assert(pparInfo
!= nullptr);
64 osl::MutexGuard
guard(jfw::FwkMutex());
66 jfw::VendorSettings aVendorSettings
;
67 std::vector
<std::unique_ptr
<JavaInfo
>> vecInfo
;
69 //Use all plug-in libraries to get Java installations.
70 std::vector
<std::unique_ptr
<JavaInfo
>> arInfos
;
71 std::vector
<rtl::Reference
<jfw_plugin::VendorBase
>> infos
;
72 javaPluginError plerr
= jfw_plugin_getAllJavaInfos(
78 if (plerr
!= javaPluginError::NONE
)
81 for (auto & j
: arInfos
)
82 vecInfo
.push_back(std::move(j
));
84 // direct mode disregards Java settings, so only retrieve
85 // JREs from settings when application mode is used
86 if (jfw::getMode() == jfw::JFW_MODE_APPLICATION
)
88 //get the list of paths to jre locations which have been
90 const jfw::MergedSettings settings
;
91 const std::vector
<OUString
> vecJRELocations
=
92 settings
.getJRELocations();
93 //Check if any plugin can detect JREs at the location
94 // of the paths added by jfw_addJRELocation
95 //Check every manually added location
96 for (auto const & ii
: vecJRELocations
)
98 std::unique_ptr
<JavaInfo
> aInfo
;
99 plerr
= jfw_plugin_getJavaInfoByPath(
103 if (plerr
== javaPluginError::NoJre
)
105 if (plerr
== javaPluginError::FailedVersion
)
107 if (plerr
== javaPluginError::WrongArch
)
109 else if (plerr
!= javaPluginError::NONE
)
112 // Was this JRE already added?
114 vecInfo
.begin(), vecInfo
.end(),
115 [&aInfo
](std::unique_ptr
<JavaInfo
> const & info
) {
116 return areEqualJavaInfo(
117 info
.get(), aInfo
.get());
120 vecInfo
.push_back(std::move(aInfo
));
125 *pparInfo
= std::move(vecInfo
);
129 catch (const jfw::FrameworkException
& e
)
131 SAL_WARN( "jfw", e
.message
);
136 std::vector
<OUString
> jfw_convertUserPathList(OUString
const& sUserPath
)
138 std::vector
<OUString
> result
;
142 sal_Int32 nextColon
= sUserPath
.indexOf(SAL_PATHSEPARATOR
, nIdx
);
143 OUString
sToken(sUserPath
.subView(nIdx
, nextColon
> 0 ? nextColon
- nIdx
144 : sUserPath
.getLength() - nIdx
));
146 // Check if we are in bootstrap variable mode (class path starts with '$').
147 // Then the class path must be in URL format.
148 if (sToken
.startsWith("$"))
150 // Detect open bootstrap variables - they might contain colons - we need to skip those.
151 sal_Int32 nBootstrapVarStart
= sToken
.indexOf("${");
152 if (nBootstrapVarStart
>= 0)
154 sal_Int32 nBootstrapVarEnd
= sToken
.indexOf("}", nBootstrapVarStart
);
155 if (nBootstrapVarEnd
== -1)
157 // Current colon is part of bootstrap variable - skip it!
158 nextColon
= sUserPath
.indexOf(SAL_PATHSEPARATOR
, nextColon
+ 1);
159 sToken
= sUserPath
.subView(nIdx
, nextColon
> 0 ? nextColon
- nIdx
160 : sUserPath
.getLength() - nIdx
);
164 result
.emplace_back(sToken
);
165 nIdx
= nextColon
+ 1;
170 javaFrameworkError
jfw_startVM(
171 JavaInfo
const * pInfo
, std::vector
<OUString
> const & arOptions
,
172 JavaVM
** ppVM
, JNIEnv
** ppEnv
)
174 assert(ppVM
!= nullptr);
175 javaFrameworkError errcode
= JFW_E_NONE
;
179 osl::MutexGuard
guard(jfw::FwkMutex());
181 //We keep this pointer so we can determine if a VM has already
183 if (g_pJavaVM
!= nullptr)
184 return JFW_E_RUNNING_JVM
;
186 std::vector
<OString
> vmParams
;
187 OString sUserClassPath
;
188 std::unique_ptr
<JavaInfo
> aInfo
;
189 if (pInfo
== nullptr)
191 jfw::JFW_MODE mode
= jfw::getMode();
192 if (mode
== jfw::JFW_MODE_APPLICATION
)
194 const jfw::MergedSettings settings
;
195 if (!settings
.getEnabled())
196 return JFW_E_JAVA_DISABLED
;
197 aInfo
= settings
.createJavaInfo();
198 //check if a Java has ever been selected
200 return JFW_E_NO_SELECT
;
202 //check if the javavendors.xml has changed after a Java was selected
203 OString sVendorUpdate
= jfw::getElementUpdated();
205 if (sVendorUpdate
!= settings
.getJavaInfoAttrVendorUpdate())
206 return JFW_E_INVALID_SETTINGS
;
208 //check if JAVA is disabled
209 //If Java is enabled, but it was disabled when this process was started
210 // then no preparational work, such as setting the LD_LIBRARY_PATH, was
211 //done. Therefore if a JRE needs it, it must not be started.
212 if (g_bEnabledSwitchedOn
&&
213 (aInfo
->nRequirements
& JFW_REQUIRE_NEEDRESTART
))
214 return JFW_E_NEED_RESTART
;
216 //Check if the selected Java was set in this process. If so it
217 //must not have the requirements flag JFW_REQUIRE_NEEDRESTART
218 if ((aInfo
->nRequirements
& JFW_REQUIRE_NEEDRESTART
)
219 && jfw::wasJavaSelectedInSameProcess())
220 return JFW_E_NEED_RESTART
;
222 vmParams
= settings
.getVmParametersUtf8();
223 // Expand user classpath (might contain bootstrap vars)
224 OUString
sUserPath(settings
.getUserClassPath());
225 std::vector paths
= jfw_convertUserPathList(sUserPath
);
226 OUString sUserPathExpanded
;
227 for (auto& path
: paths
)
229 if (!sUserPathExpanded
.isEmpty())
230 sUserPathExpanded
+= OUStringChar(SAL_PATHSEPARATOR
);
231 if (path
.startsWith("$"))
233 OUString sURL
= path
;
234 rtl::Bootstrap::expandMacros(sURL
);
235 osl::FileBase::getSystemPathFromFileURL(sURL
, path
);
237 sUserPathExpanded
+= path
;
239 sUserClassPath
= jfw::makeClassPathOption(sUserPathExpanded
);
240 } // end mode FWK_MODE_OFFICE
241 else if (mode
== jfw::JFW_MODE_DIRECT
)
243 errcode
= jfw_getSelectedJRE(&aInfo
);
244 if (errcode
!= JFW_E_NONE
)
246 //In direct mode the options are specified by bootstrap variables
247 //of the form UNO_JAVA_JFW_PARAMETER_1 .. UNO_JAVA_JFW_PARAMETER_n
248 vmParams
= jfw::BootParams::getVMParameters();
249 auto const cp
= jfw::BootParams::getClasspath();
253 "-Djava.class.path=" + cp
;
260 assert(pInfo
!= nullptr);
263 // Alternative JREs (AdoptOpenJDK, Azul Zulu) are missing the bin/ folder in
264 // java.library.path. Somehow setting java.library.path accordingly doesn't work,
265 // but the PATH gets picked up, so add it there.
266 // Without this hack, some features don't work in alternative JREs.
268 osl_getEnvironment(OUString("PATH").pData
, &sPATH
.pData
);
269 OUString sJRELocation
;
270 osl::FileBase::getSystemPathFromFileURL(pInfo
->sLocation
+ "/bin", sJRELocation
);
272 sPATH
= sJRELocation
;
274 sPATH
= sJRELocation
+ OUStringChar(SAL_PATHSEPARATOR
) + sPATH
;
275 osl_setEnvironment(OUString("PATH").pData
, sPATH
.pData
);
278 // create JavaVMOptions array that is passed to the plugin
279 // it contains the classpath and all options set in the
281 std::unique_ptr
<JavaVMOption
[]> sarJOptions(
283 arOptions
.size() + (sUserClassPath
.isEmpty() ? 2 : 3) + vmParams
.size()]);
284 JavaVMOption
* arOpt
= sarJOptions
.get();
288 //The first argument is the classpath
290 if (!sUserClassPath
.isEmpty()) {
291 arOpt
[index
].optionString
= const_cast<char*>(sUserClassPath
.getStr());
292 arOpt
[index
].extraInfo
= nullptr;
295 // Set a flag that this JVM has been created via the JNI Invocation API
296 // (used, for example, by UNO remote bridges to share a common thread pool
297 // factory among Java and native bridge implementations):
298 arOpt
[index
].optionString
= const_cast<char *>("-Dorg.openoffice.native=");
299 arOpt
[index
].extraInfo
= nullptr;
302 // Don't intercept SIGTERM
303 arOpt
[index
].optionString
= const_cast<char *>("-Xrs");
304 arOpt
[index
].extraInfo
= nullptr;
307 //add the options set by options dialog
308 for (auto const & vmParam
: vmParams
)
310 arOpt
[index
].optionString
= const_cast<char*>(vmParam
.getStr());
311 arOpt
[index
].extraInfo
= nullptr;
314 //add all options of the arOptions argument
315 std::vector
<OString
> convertedOptions
;
316 for (auto const & ii
: arOptions
)
318 OString conv
= OUStringToOString(ii
, osl_getThreadTextEncoding());
319 convertedOptions
.push_back(conv
);
320 // keep conv.getStr() alive until after the call to
321 // jfw_plugin_startJavaVirtualMachine below
322 arOpt
[index
].optionString
= const_cast<char *>(conv
.getStr());
323 arOpt
[index
].extraInfo
= nullptr;
328 JavaVM
*pVm
= nullptr;
329 SAL_INFO("jfw", "Starting Java");
330 javaPluginError plerr
= jfw_plugin_startJavaVirtualMachine(pInfo
, arOpt
, index
, & pVm
, ppEnv
);
331 if (plerr
== javaPluginError::VmCreationFailed
)
333 errcode
= JFW_E_VM_CREATION_FAILED
;
335 else if (plerr
!= javaPluginError::NONE
)
337 errcode
= JFW_E_ERROR
;
345 catch (const jfw::FrameworkException
& e
)
347 errcode
= e
.errorCode
;
348 SAL_WARN( "jfw", e
.message
);
354 /** We do not use here jfw_findAllJREs and then check if a JavaInfo
355 meets the requirements, because that means using all plug-ins, which
356 may take quite a while. The implementation first inspects JAVA_HOME and
357 PATH environment variables. If no suitable JavaInfo is found there, it
358 inspects all JavaInfos found by the jfw_plugin_get* functions.
360 javaFrameworkError
jfw_findAndSelectJRE(std::unique_ptr
<JavaInfo
> *pInfo
)
362 javaFrameworkError errcode
= JFW_E_NONE
;
365 osl::MutexGuard
guard(jfw::FwkMutex());
366 if (jfw::getMode() == jfw::JFW_MODE_DIRECT
)
367 return JFW_E_DIRECT_MODE
;
368 std::unique_ptr
<JavaInfo
> aCurrentInfo
;
371 // 'bInfoFound' indicates whether a Java installation has been found
372 bool bInfoFound
= false;
374 // get list of vendors for Java installations
375 jfw::VendorSettings aVendorSettings
;
377 std::vector
<rtl::Reference
<jfw_plugin::VendorBase
>> infos
;
379 // first inspect Java installation that the JAVA_HOME
380 // environment variable points to (if it is set)
381 if (jfw_plugin_getJavaInfoFromJavaHome(
382 aVendorSettings
, &aCurrentInfo
, infos
)
383 == javaPluginError::NONE
)
388 // if no Java installation was detected by using JAVA_HOME,
389 // query PATH for Java installations
392 std::vector
<std::unique_ptr
<JavaInfo
>> vecJavaInfosFromPath
;
393 if (jfw_plugin_getJavaInfosFromPath(
394 aVendorSettings
, vecJavaInfosFromPath
, infos
)
395 == javaPluginError::NONE
)
397 assert(!vecJavaInfosFromPath
.empty());
398 aCurrentInfo
= std::move(vecJavaInfosFromPath
[0]);
404 // if no suitable Java installation has been found yet:
405 // first use jfw_plugin_getAllJavaInfos to find a suitable Java installation,
406 // then try paths that have been added manually
409 //get all installations
410 std::vector
<std::unique_ptr
<JavaInfo
>> arInfos
;
411 javaPluginError plerr
= jfw_plugin_getAllJavaInfos(
417 if (plerr
== javaPluginError::NONE
&& !arInfos
.empty())
419 aCurrentInfo
= std::move(arInfos
[0]);
423 {//The plug-ins did not find a suitable Java. Now try the paths which have been
425 //get the list of paths to jre locations which have been added manually
426 const jfw::MergedSettings settings
;
427 //node.loadFromSettings();
428 const std::vector
<OUString
> & vecJRELocations
=
429 settings
.getJRELocations();
430 //use all plug-ins to determine the JavaInfo objects
431 for (auto const & JRELocation
: vecJRELocations
)
433 std::unique_ptr
<JavaInfo
> aInfo
;
434 javaPluginError err
= jfw_plugin_getJavaInfoByPath(
438 if (err
== javaPluginError::NoJre
)
440 if (err
== javaPluginError::FailedVersion
)
442 else if (err
!=javaPluginError::NONE
)
447 aCurrentInfo
= std::move(aInfo
);
450 }//end iterate over paths
455 jfw::NodeJava
javaNode(jfw::NodeJava::USER
);
456 javaNode
.setJavaInfo(aCurrentInfo
.get(),true);
458 //remember that this JRE was selected in this process
459 jfw::setJavaSelected();
463 *pInfo
= std::move(aCurrentInfo
);
468 errcode
= JFW_E_NO_JAVA_FOUND
;
471 catch (const jfw::FrameworkException
& e
)
473 errcode
= e
.errorCode
;
474 SAL_WARN( "jfw", e
.message
);
480 bool jfw_areEqualJavaInfo(JavaInfo
const * pInfoA
,JavaInfo
const * pInfoB
)
482 if (pInfoA
== pInfoB
)
484 if (pInfoA
== nullptr || pInfoB
== nullptr)
486 if (pInfoA
->sVendor
== pInfoB
->sVendor
487 && pInfoA
->sLocation
== pInfoB
->sLocation
488 && pInfoA
->sVersion
== pInfoB
->sVersion
489 && pInfoA
->nRequirements
== pInfoB
->nRequirements
490 && pInfoA
->arVendorData
== pInfoB
->arVendorData
)
497 javaFrameworkError
jfw_getSelectedJRE(std::unique_ptr
<JavaInfo
> *ppInfo
)
499 assert(ppInfo
!= nullptr);
500 javaFrameworkError errcode
= JFW_E_NONE
;
503 osl::MutexGuard
guard(jfw::FwkMutex());
505 if (jfw::getMode() == jfw::JFW_MODE_DIRECT
)
507 if ((errcode
= jfw_getJavaInfoByPath(
508 jfw::BootParams::getJREHome(), ppInfo
))
510 throw jfw::FrameworkException(
512 "[Java framework] The JRE specified by the bootstrap "
513 "variable UNO_JAVA_JFW_JREHOME or UNO_JAVA_JFW_ENV_JREHOME "
514 " could not be recognized. Check the values and make sure that you "
515 "use a plug-in library that can recognize that JRE."_ostr
);
520 const jfw::MergedSettings settings
;
521 *ppInfo
= settings
.createJavaInfo();
526 //If the javavendors.xml has changed, then the current selected
527 //Java is not valid anymore
528 // /java/javaInfo/@vendorUpdate != javaSelection/updated (javavendors.xml)
529 OString sUpdated
= jfw::getElementUpdated();
531 if (sUpdated
!= settings
.getJavaInfoAttrVendorUpdate())
534 return JFW_E_INVALID_SETTINGS
;
537 catch (const jfw::FrameworkException
& e
)
539 errcode
= e
.errorCode
;
540 SAL_WARN( "jfw", e
.message
);
545 bool jfw_isVMRunning()
547 osl::MutexGuard
guard(jfw::FwkMutex());
548 return g_pJavaVM
!= nullptr;
551 javaFrameworkError
jfw_getJavaInfoByPath(OUString
const & pPath
, std::unique_ptr
<JavaInfo
> *ppInfo
)
553 assert(ppInfo
!= nullptr);
554 javaFrameworkError errcode
= JFW_E_NONE
;
557 osl::MutexGuard
guard(jfw::FwkMutex());
559 jfw::VendorSettings aVendorSettings
;
561 //ask all plugins if this is a JRE.
562 //If so check if it meets the version requirements.
563 //Only if it does return a JavaInfo
564 javaPluginError plerr
= jfw_plugin_getJavaInfoByPath(
569 if(plerr
== javaPluginError::FailedVersion
)
570 {//found JRE but it has the wrong version
572 errcode
= JFW_E_FAILED_VERSION
;
574 OSL_ASSERT(plerr
== javaPluginError::NONE
|| plerr
== javaPluginError::NoJre
);
575 if (!*ppInfo
&& errcode
!= JFW_E_FAILED_VERSION
)
576 errcode
= JFW_E_NOT_RECOGNIZED
;
578 catch (const jfw::FrameworkException
& e
)
580 errcode
= e
.errorCode
;
581 SAL_WARN( "jfw", e
.message
);
588 javaFrameworkError
jfw_setSelectedJRE(JavaInfo
const *pInfo
)
590 javaFrameworkError errcode
= JFW_E_NONE
;
593 osl::MutexGuard
guard(jfw::FwkMutex());
594 if (jfw::getMode() == jfw::JFW_MODE_DIRECT
)
595 return JFW_E_DIRECT_MODE
;
596 //check if pInfo is the selected JRE
597 std::unique_ptr
<JavaInfo
> currentInfo
;
598 errcode
= jfw_getSelectedJRE( & currentInfo
);
599 if (errcode
!= JFW_E_NONE
&& errcode
!= JFW_E_INVALID_SETTINGS
)
602 if (!jfw_areEqualJavaInfo(currentInfo
.get(), pInfo
))
604 jfw::NodeJava
node(jfw::NodeJava::USER
);
605 node
.setJavaInfo(pInfo
, false);
607 //remember that the JRE was selected in this process
608 jfw::setJavaSelected();
611 catch (const jfw::FrameworkException
& e
)
613 errcode
= e
.errorCode
;
614 SAL_WARN( "jfw", e
.message
);
618 javaFrameworkError
jfw_setEnabled(bool bEnabled
)
620 javaFrameworkError errcode
= JFW_E_NONE
;
623 osl::MutexGuard
guard(jfw::FwkMutex());
624 if (jfw::getMode() == jfw::JFW_MODE_DIRECT
)
625 return JFW_E_DIRECT_MODE
;
627 if (!g_bEnabledSwitchedOn
&& bEnabled
)
629 //When the process started then Enabled was false.
630 //This is first time enabled is set to true.
631 //That means, no preparational work has been done, such as setting the
632 //LD_LIBRARY_PATH, etc.
634 //check if Enabled is false;
635 const jfw::MergedSettings settings
;
636 if (!settings
.getEnabled())
637 g_bEnabledSwitchedOn
= true;
639 jfw::NodeJava
node(jfw::NodeJava::USER
);
640 node
.setEnabled(bEnabled
);
643 catch (const jfw::FrameworkException
& e
)
645 errcode
= e
.errorCode
;
646 SAL_WARN( "jfw", e
.message
);
651 javaFrameworkError
jfw_getEnabled(bool *pbEnabled
)
653 assert(pbEnabled
!= nullptr);
654 javaFrameworkError errcode
= JFW_E_NONE
;
657 if (jfw::getMode() == jfw::JFW_MODE_DIRECT
)
658 return JFW_E_DIRECT_MODE
;
659 osl::MutexGuard
guard(jfw::FwkMutex());
660 jfw::MergedSettings settings
;
661 *pbEnabled
= settings
.getEnabled();
663 catch (const jfw::FrameworkException
& e
)
665 errcode
= e
.errorCode
;
666 SAL_WARN( "jfw", e
.message
);
672 javaFrameworkError
jfw_setVMParameters(std::vector
<OUString
> const & arOptions
)
674 javaFrameworkError errcode
= JFW_E_NONE
;
677 osl::MutexGuard
guard(jfw::FwkMutex());
678 if (jfw::getMode() == jfw::JFW_MODE_DIRECT
)
679 return JFW_E_DIRECT_MODE
;
680 jfw::NodeJava
node(jfw::NodeJava::USER
);
681 node
.setVmParameters(arOptions
);
684 catch (const jfw::FrameworkException
& e
)
686 errcode
= e
.errorCode
;
687 SAL_WARN( "jfw", e
.message
);
693 javaFrameworkError
jfw_getVMParameters(std::vector
<OUString
> * parOptions
)
695 javaFrameworkError errcode
= JFW_E_NONE
;
698 osl::MutexGuard
guard(jfw::FwkMutex());
699 if (jfw::getMode() == jfw::JFW_MODE_DIRECT
)
700 return JFW_E_DIRECT_MODE
;
702 const jfw::MergedSettings settings
;
703 settings
.getVmParametersArray(parOptions
);
705 catch (const jfw::FrameworkException
& e
)
707 errcode
= e
.errorCode
;
708 SAL_WARN( "jfw", e
.message
);
713 javaFrameworkError
jfw_setUserClassPath(OUString
const & pCp
)
715 javaFrameworkError errcode
= JFW_E_NONE
;
718 osl::MutexGuard
guard(jfw::FwkMutex());
719 if (jfw::getMode() == jfw::JFW_MODE_DIRECT
)
720 return JFW_E_DIRECT_MODE
;
721 jfw::NodeJava
node(jfw::NodeJava::USER
);
722 node
.setUserClassPath(pCp
);
725 catch (const jfw::FrameworkException
& e
)
727 errcode
= e
.errorCode
;
728 SAL_WARN( "jfw", e
.message
);
733 javaFrameworkError
jfw_getUserClassPath(OUString
* ppCP
)
735 assert(ppCP
!= nullptr);
736 javaFrameworkError errcode
= JFW_E_NONE
;
739 osl::MutexGuard
guard(jfw::FwkMutex());
740 if (jfw::getMode() == jfw::JFW_MODE_DIRECT
)
741 return JFW_E_DIRECT_MODE
;
742 const jfw::MergedSettings settings
;
743 *ppCP
= settings
.getUserClassPath();
745 catch (const jfw::FrameworkException
& e
)
747 errcode
= e
.errorCode
;
748 SAL_WARN( "jfw", e
.message
);
753 javaFrameworkError
jfw_addJRELocation(OUString
const & sLocation
)
755 javaFrameworkError errcode
= JFW_E_NONE
;
758 osl::MutexGuard
guard(jfw::FwkMutex());
759 if (jfw::getMode() == jfw::JFW_MODE_DIRECT
)
760 return JFW_E_DIRECT_MODE
;
761 jfw::NodeJava
node(jfw::NodeJava::USER
);
763 node
.addJRELocation(sLocation
);
766 catch (const jfw::FrameworkException
& e
)
768 errcode
= e
.errorCode
;
769 SAL_WARN( "jfw", e
.message
);
776 javaFrameworkError
jfw_existJRE(const JavaInfo
*pInfo
, bool *exist
)
778 javaPluginError plerr
= jfw_plugin_existJRE(pInfo
, exist
);
780 javaFrameworkError ret
= JFW_E_NONE
;
783 case javaPluginError::NONE
:
786 case javaPluginError::Error
:
797 jfw::FwkMutex().acquire();
802 jfw::FwkMutex().release();
805 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */