Simplify string handling
Change-Id: I1b79bfd7e7e92fc8f4937e6b9ae9ec9468839ea6
This commit is contained in:
@@ -646,7 +646,6 @@ javaPluginError jfw_plugin_startJavaVirtualMachine(
|
||||
options[n].optionString= (char *) "abort";
|
||||
options[n].extraInfo= (void* )(sal_IntPtr)abort_handler;
|
||||
++n;
|
||||
OString sClassPathProp("-Djava.class.path=");
|
||||
OString sClassPathOption;
|
||||
for (int i = 0; i < cOptions; i++)
|
||||
{
|
||||
@@ -654,12 +653,12 @@ javaPluginError jfw_plugin_startJavaVirtualMachine(
|
||||
// Until java 1.5 we need to put a plugin.jar or javaplugin.jar (<1.4.2)
|
||||
// in the class path in order to have applet support.
|
||||
OString sClassPath = arOptions[i].optionString;
|
||||
if (sClassPath.match(sClassPathProp, 0))
|
||||
if (sClassPath.startsWith("-Djava.class.path="))
|
||||
{
|
||||
char sep[] = {SAL_PATHSEPARATOR, 0};
|
||||
OString sAddPath = getPluginJarPath(pInfo->sVendor, pInfo->sLocation,pInfo->sVersion);
|
||||
if (!sAddPath.isEmpty())
|
||||
sClassPathOption = sClassPath + OString(sep) + sAddPath;
|
||||
sClassPathOption = sClassPath + OString(SAL_PATHSEPARATOR)
|
||||
+ sAddPath;
|
||||
else
|
||||
sClassPathOption = sClassPath;
|
||||
options[n].optionString = (char *) sClassPathOption.getStr();
|
||||
|
Reference in New Issue
Block a user