Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

convert c++ float to jfloat???

843829Jan 28 2005 — edited Jan 29 2005
Hi,

I'm trying to get a float value from my C++ program to Java. I'm creating the float variable in eVC++ and doing some calculation with that and then want to return the float in java. But I always get the value of float variable in Java is 0.0. And I also can't check the value of 'width' in eVC++. How can I print the value of float in a messagebox in eVC++ or in Java console from C++ program? How can I get the C++ float value to Java? The C++ code -
JNIEXPORT jfloat JNICALL Java_packageName_ClassName_methodName(JNIEnv *env, jobject, jstring jStr) {

float width;
....
doing something with width
....
return width;
}
Any idea???

thanx
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 26 2005
Added on Jan 28 2005
1 comment
1,135 views