Commit 8a5691f8 by Mark Wielaard Committed by Mark Wielaard

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
parent f5c27306
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> 2005-04-19 Michael Koch <konqueror@gmx.de>
* javax/swing/text/rtf/ControlWordToken.java, * javax/swing/text/rtf/ControlWordToken.java,
......
...@@ -598,13 +598,20 @@ java::lang::Runtime::insertSystemProperties (java::util::Properties *newprops) ...@@ -598,13 +598,20 @@ java::lang::Runtime::insertSystemProperties (java::util::Properties *newprops)
// CLASSPATH environment variable if given. See gij.cc main () and // CLASSPATH environment variable if given. See gij.cc main () and
// prims.cc _Jv_CreateJavaVM () for all the ways this could have // prims.cc _Jv_CreateJavaVM () for all the ways this could have
// been set much earlier. // 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")); path = newprops->getProperty(JvNewStringLatin1("java.class.path"));
if (!path) if (!path)
{ {
char *classpath = getenv("CLASSPATH"); char *classpath = getenv("CLASSPATH");
if (classpath) if (classpath && classpath[0] != 0)
SET ("java.class.path", classpath); {
path = JvNewStringLatin1 (classpath);
newprops->put(JvNewStringLatin1 ("java.class.path"), path);
}
} }
if (!path || path->length() == 0)
SET ("java.class.path", ".");
} }
java::lang::Process * java::lang::Process *
......
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