NonStop Server for Java (NSJ) Programmer's Guide (NSJ 2.0+)
fprintf(stderr, "Error creating String array.\n");
}
exit(1);
}
/*
* execute Java "main" method in Hello.class
*/
(*env)->CallStaticVoidMethod(env, cls, mid, mainArgs);
if ((*env)->ExceptionOccurred(env)) {
(*env)->ExceptionDescribe(env);
}
/* Destroy Java VM */
(*jvm)->DestroyJavaVM(jvm);
return 0;
}
To run the Invocation API demo, follow the instructions for the Invocation API demo in the README file in the directory
/usr/tandem/java/demo/invocation_api.
IEEE Floating-Point Implementation
Java uses IEEE floating-point arithmetic. NonStop
TM
Server for Java 2.0 uses the public-domain software-emulation package
SoftFloat to achieve IEEE floating-point compliance. The SoftFloat library is packaged with the Java Virtual Machine
(JVM).
Incompatibilities between the IEEE and Compaq floating-point representations might cause loss of precision or accuracy
when you convert a Java String that represents a Compaq float or double value to a Java Float or Double value.
This subsection explains the following subjects:
Floating-point values●
Double-precision values●
Floating-Point Values
For floating-Point values, Compaq floating-point representations have larger exponents (and therefore, a larger range) than
IEEE floating-point representations, but they are less precise, as the following table shows.
Floating-Point Ranges
Floating-Point Representation Minimum Positive Decimal Value Maximum Decimal Value
Compaq 1.7272337e-77F 1.1579208e77F
IEEE 1.40239846E-45F 3.40282347E+38
If you convert a Java String that represents a Compaq float value to a Java Float value, and the value is outside the
IEEE floating-point range, the effect of the conversion is indeterminate.
If you convert a Java String that represents a Compaq float value to a Java Float value, and the value is within the
IEEE floating-point range, the last bit of precision is meaningless.
Double-Precision Values
For double-precision values, Compaq floating-point representations have smaller exponents (and therefore, a smaller range)
than IEEE floating-point representations, but they are more precise, as the following table shows.