OSDN Git Service

* java/lang/natRuntime.cc (insertSystemProperties): Set
authormark <mark@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 13 Apr 2005 16:46:47 +0000 (16:46 +0000)
committermark <mark@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 13 Apr 2005 16:46:47 +0000 (16:46 +0000)
       java.class.path to CLASSPATH if not already set.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@98099 138bc75d-0d04-0410-961f-82ee72b054a4

libjava/ChangeLog
libjava/java/lang/natRuntime.cc

index 1602046..7c388da 100644 (file)
@@ -1,3 +1,8 @@
+2005-04-13  Mark Wielaard  <mark@klomp.org>
+
+       * java/lang/natRuntime.cc (insertSystemProperties): Set
+       java.class.path to CLASSPATH if not already set.
+
 2005-04-07  Thomas Fitzsimmons  <fitzsim@redhat.com>
 
        * prims.cc (parse_verbose_args): Fix verbose argument parsing.
index 0cdd7ac..9ffeef7 100644 (file)
@@ -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 *