Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback, please email oracle-forums_moderators_us@oracle.com

JNI return double with NaN

863941May 24 2011 — edited May 24 2011
check my code first.

JNIEXPORT jdouble JNICALL Java_Test_getDouble(JNIEnv *env, jclass unused, jlong v)
{
double d = -2.71000;
return (jdouble)d;
}
When Test.getDouble() is called in java, NaN is returned.
Can someone tell me what is going on here and how can I fixed it?

I am using MIPS gcc compiler (mips-linux-gnu-gcc) along with the option -msoft-float.
Thanks in advance.

Sam
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 21 2011
Added on May 24 2011
4 comments
1,323 views