[kaffe] [patch] Making -classpath behave like Java 1.2

Dalibor Topic robilad@yahoo.com
Sun Jan 12 16:59:01 2003


--0-1782891542-1042419569=:14636
Content-Type: text/plain; charset=us-ascii
Content-Id: 
Content-Disposition: inline

Hi,
 
attached you'll find a patch that makes the -classpath
option behave more like Sun's jdk 1.2 (and later
versions). It is no longer required to pass the
location of kaffe's rt.jar in --classpath. This allows
scripts for running Java applications that expect to
pass just their jars on the -classpath to run on
kaffe. It also makes life easier when dealing with ant
builds scripts that run the jvm in a separate process.

Plus it would mostly (except for setting CLASSPATH)
fix this important debian bug:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=170021

If noone objects, I'll check this in over the week.

best regards,
dalibor topic

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
--0-1782891542-1042419569=:14636
Content-Type: application/octet-stream; name="classpath.patch"
Content-Transfer-Encoding: base64
Content-Description: classpath.patch
Content-Disposition: attachment; filename="classpath.patch"

ZGlmZiAtdXIga2FmZmUva2FmZmUva2FmZmUvbWFpbi5jIGthZmZlLXBhdGNo
ZWQva2FmZmUva2FmZmUvbWFpbi5jCi0tLSBrYWZmZS9rYWZmZS9rYWZmZS9t
YWluLmMJMjAwMy0wMS0xMSAyMzoyMTo0NS4wMDAwMDAwMDAgKzAxMDAKKysr
IGthZmZlLXBhdGNoZWQva2FmZmUva2FmZmUvbWFpbi5jCTIwMDMtMDEtMTIg
MjM6MjQ6MzguMDAwMDAwMDAwICswMTAwCkBAIC0zMDcsMzEgKzMwNywzNiBA
QAogCQkJLyogRklYTUU6IHNraXAsIGNhc2UgaGFuZGxlZCBieSB0aGUgY2Fs
bGUgc2NyaXB0ICovCiAJCX0KICNlbmRpZgotCQllbHNlIGlmIChzdHJjbXAo
YXJndltpXSwgIi1jbGFzc3BhdGgiKSA9PSAwKSB7Ci0JCQlpKys7Ci0JCQlp
ZiAoYXJndltpXSA9PSAwKSB7Ci0JCQkJZHByaW50ZigKLQkJCQkgICAgIkVy
cm9yOiBObyBwYXRoIGZvdW5kIGZvciAlcyBvcHRpb24uXG4iLAotCQkJCSAg
ICAiLWNsYXNzcGF0aCIpOwotCQkJCWV4aXQoMSk7Ci0JCQl9Ci0JCQl2bWFy
Z3MuY2xhc3NwYXRoID0gYXJndltpXTsKLQkJfQotCQllbHNlIGlmIChzdHJj
bXAoYXJndltpXSwgIi1hZGRjbGFzc3BhdGgiKSA9PSAwKSB7CisvKiAgICAg
ICAgICAgICAgICAgZWxzZSBpZiAoc3RyY21wKGFyZ3ZbaV0sICItY2xhc3Nw
YXRoIikgPT0gMCkgeyAqLworLyogICAgICAgICAgICAgICAgICAgICAgICAg
aSsrOyAqLworLyogICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGFyZ3Zb
aV0gPT0gMCkgeyAqLworLyogICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICBkcHJpbnRmKCAqLworLyogICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgIkVycm9yOiBObyBwYXRoIGZvdW5kIGZvciAlcyBvcHRp
b24uXG4iLCAqLworLyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgIi1jbGFzc3BhdGgiKTsgKi8KKy8qICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgZXhpdCgxKTsgKi8KKy8qICAgICAgICAgICAgICAg
ICAgICAgICAgIH0gKi8KKy8qICAgICAgICAgICAgICAgICAgICAgICAgIHZt
YXJncy5jbGFzc3BhdGggPSBhcmd2W2ldOyAqLworLyogICAgICAgICAgICAg
ICAgIH0gKi8KKwkJZWxzZSBpZiAoKHN0cmNtcChhcmd2W2ldLCAiLWFkZGNs
YXNzcGF0aCIpID09IDApCisJCQkgfHwgKHN0cmNtcChhcmd2W2ldLCAiLWNs
YXNzcGF0aCIpID09IDApKSB7CiAJCQljaGFyCSpuZXdjcGF0aDsKKwkJCWlu
dCAgICAgIGNwYXRobGVuZ3RoOwogCiAJCQ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