diff options
| author | Mark Wielaard <mark@klomp.org> | 2005-04-13 16:46:47 +0000 |
|---|---|---|
| committer | Mark Wielaard <mark@gcc.gnu.org> | 2005-04-13 16:46:47 +0000 |
| commit | f5e002ce85f1dcc83f9cecc38df7a53f552d9722 (patch) | |
| tree | 77649c5f7f9b7681bb63997b2cc6cf4d67d263a9 /libjava/java | |
| parent | 23a8ae8d463bc2658e382ed0c334d7da271617d2 (diff) | |
| download | gcc-f5e002ce85f1dcc83f9cecc38df7a53f552d9722.zip gcc-f5e002ce85f1dcc83f9cecc38df7a53f552d9722.tar.gz gcc-f5e002ce85f1dcc83f9cecc38df7a53f552d9722.tar.bz2 | |
natRuntime.cc (insertSystemProperties): Set java.class.path to CLASSPATH if not already set.
* java/lang/natRuntime.cc (insertSystemProperties): Set
java.class.path to CLASSPATH if not already set.
From-SVN: r98099
Diffstat (limited to 'libjava/java')
| -rw-r--r-- | libjava/java/lang/natRuntime.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libjava/java/lang/natRuntime.cc b/libjava/java/lang/natRuntime.cc index 0cdd7ac..9ffeef7 100644 --- a/libjava/java/lang/natRuntime.cc +++ b/libjava/java/lang/natRuntime.cc @@ -593,6 +593,18 @@ java::lang::Runtime::insertSystemProperties (java::util::Properties *newprops) // LD_LIBRARY_PATH, etc. SET ("java.library.path", ""); } + + // If java.class.path is still not set then set it according to the + // 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. + path = newprops->getProperty(JvNewStringLatin1("java.class.path")); + if (!path) + { + char *classpath = getenv("CLASSPATH"); + if (classpath) + SET ("java.class.path", classpath); + } } java::lang::Process * |
