summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xjvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx2
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/util.cxx15
2 files changed, 13 insertions, 4 deletions
diff --git a/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx b/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx
index 1a6f99f65ba4..19130d23ae7e 100755
--- a/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx
+++ b/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx
@@ -106,7 +106,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
errcode = jfw_existJRE(pInfo, &bExist);
if (errcode == JFW_E_NONE)
{
- if (false == findAndSelect(&pInfo))
+ if (!bExist && !findAndSelect(&pInfo))
return -1;
}
else
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
index 66496afa5611..fedfa75947ec 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
@@ -740,9 +740,8 @@ vector<Reference<VendorBase> > getAllJREInfos()
//Otherwise in SDKs Java may be started twice
createJavaInfoFromPath(vecInfos);
-#ifdef UNX
createJavaInfoDirScan(vecInfos);
-#endif
+
bubbleSortVersion(vecInfos);
return vecInfos;
}
@@ -1114,6 +1113,15 @@ bool makeDriveLetterSame(OUString * fileURL)
}
#ifdef UNX
+#ifdef SOLARIS
+
+void createJavaInfoDirScan(vector<rtl::Reference<VendorBase> >& vecInfos)
+{
+ JFW_TRACE2(OUSTR("\n[Java framework] Checking \"/usr/jdk/latest\"\n"));
+ getJREInfoByPath(OUSTR("file:////usr/jdk/latest"), vecInfos);
+}
+
+#else
void createJavaInfoDirScan(vector<rtl::Reference<VendorBase> >& vecInfos)
{
OUString excMessage = OUSTR("[Java framework] sunjavaplugin: "
@@ -1236,5 +1244,6 @@ void createJavaInfoDirScan(vector<rtl::Reference<VendorBase> >& vecInfos)
}
}
}
-#endif
+#endif // ifdef SOLARIS
+#endif // ifdef UNX
}