Kaydet (Commit) c5cdcd8f authored tarafından Michael Stahl's avatar Michael Stahl

jvmfwk: print a warning if running java fa

Change-Id: Ibfcd6678ed1503cfab0881f3ec67c4c158d798cb
üst fd35ddd3
...@@ -390,12 +390,16 @@ bool getJavaProps(const OUString & exePath, ...@@ -390,12 +390,16 @@ bool getJavaProps(const OUString & exePath,
OUString sThisLib; OUString sThisLib;
if (osl_getModuleURLFromAddress((void *) (sal_IntPtr)& getJavaProps, if (osl_getModuleURLFromAddress((void *) (sal_IntPtr)& getJavaProps,
& sThisLib.pData) == sal_False) & sThisLib.pData) == sal_False)
{
return false; return false;
}
sThisLib = getDirFromFile(sThisLib); sThisLib = getDirFromFile(sThisLib);
OUString sClassPath; OUString sClassPath;
if (osl_getSystemPathFromFileURL(sThisLib.pData, & sClassPath.pData) if (osl_getSystemPathFromFileURL(sThisLib.pData, & sClassPath.pData)
!= osl_File_E_None) != osl_File_E_None)
{
return false; return false;
}
#ifdef MACOSX #ifdef MACOSX
if (sClassPath.endsWith("/")) if (sClassPath.endsWith("/"))
...@@ -456,6 +460,8 @@ bool getJavaProps(const OUString & exePath, ...@@ -456,6 +460,8 @@ bool getJavaProps(const OUString & exePath,
{ {
JFW_TRACE2("[Java framework] Execution failed. \n"); JFW_TRACE2("[Java framework] Execution failed. \n");
*bProcessRun = false; *bProcessRun = false;
SAL_WARN("jfw",
"osl_executeProcess failed (" << ret << "): \"" << exePath << "\"");
return ret; return ret;
} }
else else
...@@ -885,7 +891,9 @@ rtl::Reference<VendorBase> getJREInfoByPath( ...@@ -885,7 +891,9 @@ rtl::Reference<VendorBase> getJREInfoByPath(
OUString sResolvedDir = resolveDirPath(path); OUString sResolvedDir = resolveDirPath(path);
// If this path is invalid then there is no chance to find a JRE here // If this path is invalid then there is no chance to find a JRE here
if (sResolvedDir.isEmpty()) if (sResolvedDir.isEmpty())
{
return 0; return 0;
}
//check if the directory path is good, that is a JRE was already recognized. //check if the directory path is good, that is a JRE was already recognized.
//Then we need not detect it again //Then we need not detect it again
...@@ -936,13 +944,17 @@ rtl::Reference<VendorBase> getJREInfoByPath( ...@@ -936,13 +944,17 @@ rtl::Reference<VendorBase> getJREInfoByPath(
//The file path (to java exe) is not valid //The file path (to java exe) is not valid
cit_path ifull = find(vecBadPaths.begin(), vecBadPaths.end(), sFullPath); cit_path ifull = find(vecBadPaths.begin(), vecBadPaths.end(), sFullPath);
if (ifull == vecBadPaths.end()) if (ifull == vecBadPaths.end())
{
vecBadPaths.push_back(sFullPath); vecBadPaths.push_back(sFullPath);
}
continue; continue;
} }
cit_path ifile = find(vecBadPaths.begin(), vecBadPaths.end(), sFilePath); cit_path ifile = find(vecBadPaths.begin(), vecBadPaths.end(), sFilePath);
if (ifile != vecBadPaths.end()) if (ifile != vecBadPaths.end())
{
continue; continue;
}
MapIt entry = mapJREs.find(sFilePath); MapIt entry = mapJREs.find(sFilePath);
if (entry != mapJREs.end()) if (entry != mapJREs.end())
...@@ -1008,7 +1020,9 @@ rtl::Reference<VendorBase> getJREInfoByPath( ...@@ -1008,7 +1020,9 @@ rtl::Reference<VendorBase> getJREInfoByPath(
} }
if (props.empty()) if (props.empty())
{
return rtl::Reference<VendorBase>(); return rtl::Reference<VendorBase>();
}
//find java.vendor property //find java.vendor property
typedef vector<pair<OUString, OUString> >::const_iterator c_ip; typedef vector<pair<OUString, OUString> >::const_iterator c_ip;
...@@ -1040,7 +1054,9 @@ rtl::Reference<VendorBase> getJREInfoByPath( ...@@ -1040,7 +1054,9 @@ rtl::Reference<VendorBase> getJREInfoByPath(
} }
} }
if (!ret.is()) if (!ret.is())
{
vecBadPaths.push_back(sFilePath); vecBadPaths.push_back(sFilePath);
}
else else
{ {
JFW_TRACE2(OUString("[Java framework] sunjavaplugin") JFW_TRACE2(OUString("[Java framework] sunjavaplugin")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment