-
using natives
using natives...
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?
-
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?
-
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?
ArchAngel.
O:-)
-
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.
Sharbov.
-
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks