classpath
Archie Cobbs
archie at whistle.com
Tue Jul 14 18:38:15 PDT 1998
There is a problem I've found with the way kaffe 1.0b1 handles
CLASSPATH... not sure what the 'right answer' would be, so this
is sortof my opinion..
It's nice that you don't have to set CLASSPATH -- and if you don't
kaffe automatically adds the right stuff from KAFFEHOME for you.
However, if you DO set CLASSPATH, kaffe does NOT automatically add
the right stuff from KAFFEHOME.
The problem is that this means you can't do something like this:
$ (setenv CLASSPATH /foo/bar.zip:${CLASSPATH} ; kaffe What.ever.Main )
that is, temporarily prepend an entry to the normal (empty) classpath,
when CLASSPATH is not normally set.
May I suggest the following patch? This forces kaffe to always add
the "right stuff" to the end of the classpath. This patch also fixes
a separate string concatenation problem.
Thanks,
-Archie
Index: findInJar.c
===================================================================
RCS file: /cvs/mod/net/kaffe/kaffe/kaffevm/findInJar.c,v
retrieving revision 1.1.1.3
diff -c -u -r1.1.1.3 findInJar.c
--- findInJar.c 1998/07/14 16:48:39 1.1.1.3
+++ findInJar.c 1998/07/15 01:32:09
@@ -326,7 +326,7 @@
if (cp != 0) {
makeClasspath(cp);
}
- else {
+ if (hm != 0) {
discoverClasspath(hm);
}
@@ -339,6 +339,7 @@
for (ptr = classpath; ptr != 0; ptr = ptr->next) {
if (ptr != classpath) {
realClassPath[strlen(realClassPath)] = PATHSEP;
+ realClassPath[strlen(realClassPath) + 1] = '\0';
}
strcat(realClassPath, ptr->path);
}
___________________________________________________________________________
Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com
More information about the kaffe
mailing list