ActiveX to Java primitive data type conversion values

All primitive Java data types are automatically converted to native ActiveX Automation types. However, not all Automation data types are converted to Java types (for example, VT_DATE). Variant data types are used for data conversion. Variant data types are a requirement of any Automation interface, and are used automatically by Visual Basic and VBScript. The tables below provide details about how primitive data types are converted between Automation types and Java types.
ActiveX to Java primitive data type conversion

Visual Basic Type Variant Type Java Type Notes
Byte VT_I1 byte Byte in Visual Basic is unsigned, but is signed in Java data type.
Boolean VT_BOOL boolean  
Integer VT_I2 short  
Long VT_I4 int  
Currency VT_CY long  
Single VT_R4 float  
Double VT_R8 double  
String VT_BSTR java.lang.String  
String VT_BSTR char  
Date VT_DATE n/a  


See Also

Use helper methods for data type conversion