This is the mail archive of the java-patches@sourceware.cygnus.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Patch: java.lang.classpath property


The java.lang.classpath property isn't being set. This means that the
interpreter is not searching the CLASSPATH for class files.

        * java/lang/natSystem.cc (init_properties): set java.lang.classpath
        property.

  [ bryce ]

Index: libjava/java/lang/natSystem.cc
===================================================================
RCS file: /cvs/java/libgcj/libjava/java/lang/natSystem.cc,v
retrieving revision 1.18
diff -u -r1.18 natSystem.cc
--- natSystem.cc	2000/02/11 17:32:52	1.18
+++ natSystem.cc	2000/02/15 06:32:43
@@ -261,9 +261,9 @@
   SET ("java.specification.name", "Java(tm) Language Specification");
   SET ("java.specification.vendor", "Sun Microsystems Inc.");
 
-  // FIXME: how to set these given location-independence?
+  // FIXME: how to set this given location-independence?
   // SET ("java.home", "FIXME");
-  // SET ("java.class.path", "FIXME");
+  
   SET ("file.encoding", default_file_encoding);
 
 #ifdef WIN32
@@ -295,6 +295,13 @@
       SET ("os.version", "unknown");
     }
 #endif /* HAVE_UNAME */
+
+  char *classpath = ::getenv("CLASSPATH");
+  // FIXME: find libgcj.zip and append its path?
+  if (classpath != NULL)
+    SET ("java.class.path", classpath);
+  else
+    SET ("java.class.path", ".");
 
 #ifndef NO_GETUID
 #ifdef HAVE_PWD_H

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]