natRuntime.cc (insertSystemProperties): Set java.class.path to CLASSPATH only when not empty.

* java/lang/natRuntime.cc (insertSystemProperties): Set
       java.class.path to CLASSPATH only when not empty. Fall back to
       default path "." when java.class.path is empty.

From-SVN: r98394
This commit is contained in:
Mark Wielaard 2005-04-19 09:29:16 +00:00 committed by Mark Wielaard
parent f5c273065a
commit 8a5691f87d
2 changed files with 15 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2005-04-19 Mark Wielaard <mark@klomp.org>
* java/lang/natRuntime.cc (insertSystemProperties): Set
java.class.path to CLASSPATH only when not empty. Fall back to
default path "." when java.class.path is empty.
2005-04-19 Michael Koch <konqueror@gmx.de>
* javax/swing/text/rtf/ControlWordToken.java,

View File

@ -598,13 +598,20 @@ java::lang::Runtime::insertSystemProperties (java::util::Properties *newprops)
// CLASSPATH environment variable if given. See gij.cc main () and
// prims.cc _Jv_CreateJavaVM () for all the ways this could have
// been set much earlier.
// If CLASSPATH isn't set or if the path is empty fall back to "."
path = newprops->getProperty(JvNewStringLatin1("java.class.path"));
if (!path)
{
char *classpath = getenv("CLASSPATH");
if (classpath)
SET ("java.class.path", classpath);
if (classpath && classpath[0] != 0)
{
path = JvNewStringLatin1 (classpath);
newprops->put(JvNewStringLatin1 ("java.class.path"), path);
}
}
if (!path || path->length() == 0)
SET ("java.class.path", ".");
}
java::lang::Process *