what's the C++/Windows.h defined equivalent for a java boolean?
i have a java method that returns a boolean, and i'm calling it from the native side.
is it ok to assume, that if i were to pass a value from a java method returning, let's say, an int to a windows.h defined data type like BOOL, is it ok? or do i have to cast it explicitly or something?
08-20-2003, 02:44 AM
xylex_blaiste
also does anyone know of a good JNI complete reference book? it's very hard to find one here in our local bookstores. having to order it online is something else, since i can't check the contents. any suggestions?
08-20-2003, 03:43 AM
ArchAngel
I've never done it, but your idea of an int does sound sensible. Can't you just try it out and see if it works?
08-20-2003, 12:17 PM
sharbov
jni.h
Just take a look at jni.h that is places under your jdk home dir. You will find all the java types defenitions there.
08-22-2003, 08:33 AM
xylex_blaiste
nah, it's BOOL as typdefed in windows.h. it's a 16-bit integer that returns a 1 or 0 for true and false. and i don't have to cast it or anything. was just wondering since what to place in e.g.( " is true or false %? ", MYBOOLVAR ). boolean is written jboolean when calling from the native side.