initNative() kaffe 1.0b2

James Lundblad jamesl at eecs.berkeley.edu
Thu Oct 8 16:11:24 PDT 1998


I think it would be nice for compatibility reasons if initNative() (
kaffe/kaffevm/external.c ) would use the LIBRARYPATH ( aka
LD_LIBRARY_PATH ) ala 1.0b1 when both Kaffe_JavaVMArgs[0].librarypath
and  Kaffe_JavaVMArgs[0].classhome are uninitialize ( == 0 ).
This allows JNI code that worked for 1.0b1 and the JDK to work without
modification.

Here are the diffs for kaffe/kaffevm/external.c (1.0b2):

99a100,103
> 	if ((home == 0) && (lpath == 0)) {
> 		ptr = getenv(LIBRARYPATH);
> 		len += strlen(ptr);
> 	}
116a121,123
> 	if ((home == 0) && (lpath == 0) && (ptr != 0)) {
> 		strcat(libraryPath,ptr);
> 	}

-- 
James A. Lundblad			Visiting Scholar?
phone: 510-643-7612			558 Cory Hall
fax: 510-642-2739			EECS Department
email: jamesl at eecs.berkeley.edu		University of California
http://www.eecs.berkeley.edu/~jamesl	Berkeley CA 94720-1772


More information about the kaffe mailing list