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:
committed by
Mark Wielaard
parent
f5c273065a
commit
8a5691f87d
@@ -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 *
|
||||
|
||||
Reference in New Issue
Block a user