This topic covers new features and other enhancements that come with the SDK for Java, version 3.2.
Note The build numbers of the Microsoft VM and jvc for this SDK release can be found in the file Build.txt, located in the Relnotes folder of the SDK.
Microsoft VM Enhancements
New Development Tools and Utilities
New Classes, Interfaces, and Methods
New Samples
New White Papers
New Documentation
Application Foundation Classes (AFC) Have Moved
Microsoft VM Enhancements
In this release the Microsoft VM continues its performance leadership and includes:
JDK 1.1 support
- JDK 1.1 is supported (with the exception of RMI, which is freely available from our ftp site
).
Expanded Digital Alpha Support
- Now available in the root level of the downloaded and installed SDK for Java, the \Binalpha folder contains more tools ported to the Digital Alpha platform.
Qvue.exe
Jactivex.exe
Jexegen.exe
Javareg.exe
Be sure to have the CLASSPATH environment variable set correctly. Include \Bin for x86 architectures, \Binalpha for Digital Alpha architectures. For more information on these tools, see the Tools Reference. Note that a Digital Alpha version of vjreg.exe will be available in future SDK releases.
Year 2000 compliance
Java/COM Integration
- The com.ms.com package now includes standard COM interfaces such as IMarshal, IMoniker, IPersist, and IStorage.
- The com.ms.com package now includes standard COM-related data structures like MULTI_QI, COAUTHIDENITY, and BIND_OPTS.
- You can now implement a COM interface in a derived class and pick up methods from the base class as the concrete COM implementation. Prior to this, you had to declare a "dummy" method in the derived class that called the superclass method.
- Java/COM integration documentation is expanded. See Integrating Java and COM in the Programmer's Guide, and White Papers.
J/Direct Declarations
- The com.ms.win32.Ole32 class now includes most of the J/Direct declarations for the functions in ole32.dll.
Threading Support
Better Compatibility
- The performance of the auto-dispatch dispinterface engine has been increased and scales better to multiple processors.
- WFC-implemented ActiveX controls now implement IDataObject to work in some Microsoft® Office scenarios.
- The auto-typelib generation of the Microsoft virtual machine properly makes methods that return a com.ms.com.Variant map to a VARIANT* rather than a VARIANT in the physical type library. As it was, Microsoft® Visual Basic® and the Microsoft® Visual C++® #import directive rejected these methods.
New XML Parser
Miscellaneous
- The problem of superfluous QueryInterface calls has been addressed. The Microsoft VM now quickly recognizes interface pointers without first attempting to unwrap them as Java-implemented objects.
- The Microsoft VM now gives precedence to method behavior over Beans-style properties in the auto-dispatch engine.
- More standard COM wrappers added to the com.ms.com package: IConnectionPointContainer, IConnectionPoint, IEnumConnectionPoints IEnumConnections, CONNECTDATA IEnumUnknown, ILockBytes, IPersistStreamInit, and ISequentialStream.
- JIT bugs and other miscellaneous bugs have been fixed.
- Support for marshaling Delegates as IDispatch function pointers, used by clients such as the Internet Explorer scripting engines. Delegates can be used as a script function pointer, which are used in HTML for things like document and window events. The COM wrapper for a delegate supports IDispatch where DISPID_VALUE causes the delegate's invoke() method to be called.
For more documentation on the Microsoft VM, see Microsoft Virtual Machine.
New Development Tools and Utilities
Tools and utilities are located in the \Bin folder and subfolders (for x86 architectures) and \Binalpha folder (for Digital Alpha architectures). Be sure to have the CLASSPATH environment variable set correctly.
Expanded Digital Alpha Support
Now available in the root level of the downloaded and installed SDK for Java, the \Binalpha folder contains more tools ported to the Digital Alpha platform.
Qvue.exe
Jactivex.exe
Jexegen.exe
Javareg.exe
For more information on these tools, see the Tools Reference. Note that a Digital Alpha version of vjreg.exe will be available in future SDK releases.
Microsoft Compiler for Java (jvc)
Jvc supports JDK 1.1 (with the exception of RMI, which is freely available from our ftp site
).
In this version of jvc, the /x switch that disables Microsoft extensions is the default setting. For more information about jvc command-line options and error messages, see Jvc.
Vjreg
Vjreg (for x86) is new in this SDK. With vjreg, you can register Java classes as COM components in the registry and register multiple Java classes in one execution. Note that a Digital Alpha version of vjreg.exe will be available in future SDK releases.
Jexegen
Jexegen (for x86) is enhanced to be able to create COM DLLs and to merge Microsoft® Win32® resources (.res files) and typelibs into the generated image. The following new switches have been documented:
/BA:<address>
/CRI:<filename>
/D, /NOLOGO
/REG
/STACK:<reserve>
/WIN32RES
/WIN32RES-
New Classes, Interfaces, and Methods
This section organizes the additions according to the version of the Microsoft VM to which they apply.
Microsoft VM versions 2437 through 2925
Microsoft VM versions 2925 through 3167
Microsoft VM versions 2437 through 2925
- The following methods were added to the com.ms.lang.SystemX class:
blockcopy
compareString
exitProcessAfterMainThreadReturns
- The following methods were added to the com.ms.security.PermissionUtils class, but are not documented. This is by design.
unescapeChars
requiresQuotes
escapeString
escapeChars
unescapeString
- The following AFC methods were added, and are documented in the Microsoft® SDK for Application Foundation Classes:
com.ms.ui.IUIComponent com.ms.ui.AwtUIChoice.add(java.lang.String)
com.ms.fx.FxGraphics.drawFocusRect(int,int,int,int)
com.ms.fx.IFxSystemInterface.callRootOnEventThread(com.ms.ui.UIRoot)
com.ms.fx.FxComponentImage.getImage(int, int, int,
java.awt.Color, java.awt.Color)
- The following method and constructor were added to the com.ms.com.Variant class:
toScriptObject
Variant(Object value, boolean unwrapScriptObjects)
- The following methods were added to the com.ms.com.ComLib class:
unknownToPtr
ptrRelease
ptrToUnknown
makeProxyRef
executeOnContext(
- The following methods were added to the com.ms.dll.DllLib class:
stringToHGlobalAnsi
copyUni
propagateStructFields
stringToCoTaskMemAnsi
stringToHGlobalAnsi
- The following classes were added to the com.ms.win32 package:
EnumFontFamExProc
NEWTEXTMETRIC
NEWTEXTMETRICEX
REBARBANDINFO_IE4
win
Win32Lib
windynamic
Note By design, individual members of the com.ms.win32 package are not documented.
Microsoft VM versions 2925 through 3167
- The following methods were added to the com.ms.awt.GraphicsX class:
drawNativeEdge
drawNativeFocusRect
- The setPeriod method was added to the com.ms.util.Timer class, but is not documented. This is by design.
- The following AFC methods were added to the com.ms.ui.UIEdit class, and are documented in the Microsoft® SDK for Application Foundation Classes:
isUndoAllowed
allowUndo
- The following methods were added to the com.ms.com.ComLib class:
startMTAThread
getGuidOf
ptrToStruct
- The following methods were added to the com.ms.com.STATSTG class:
getCLSID
setCLSID
- The following method was added to the com.ms.dll.DllLib class:
ptrToStruct
- The following interfaces were added to the com.ms.com package:
IBindCtx
IClassFactory
IConnectionPoint
IConnectionPointContainer
IEnumConnectionPoints
IEnumConnections
IEnumMoniker
IEnumSTATSTG
IEnumString
IEnumUnknown
ILockBytes
IMarshal
IMoniker
IParseDisplayName
IPersist
IPersistFile
IPersistStorage
IPeristStream
IPersistStreamInit
IROTData
IRunningObjectTable
ISequentialStream
IStorage
- The following classes were added to the com.ms.com package:
BIND_OPTS
CONNECTDATA
COAUTHINFO
COAUTHIDENTITY
COSERVERINFO
MULTI_QI
- The following classes were added to the com.ms.win32 package:
Ole32
oleacc
- The following method and two constructors were added to the com.ms.win32.FILETIME class:
getTimeLong()
FILETIME(int, int)
FILETIME(long)
- New constants were added to these classes:
com.ms.win32.winb
com.ms.win32.winc
com.ms.win32.winl
com.ms.win32.winm
com.ms.win32.winr
com.ms.win32.wins
Note By design, individual members of the com.ms.win32 package are not documented.
New Samples
The following samples are new:
Browser Applet Control
CCIEx
Class Decoder
COM
Crypto
Dispatch
IMarshal
IPersist
Java/COM Apartment
JView Profiler
MTS Sample Bank Application
Microsoft® Windows NT® Service
Sample Monitor (Profiler)
Simple OCX Control
Variant SafeArray
For more information on samples, see the Samples Overview.
New White Papers
The following white papers are new:
Integrating Java and COM
Using COM Objects from Java
Debugging and Profiling Java Applications
There are additional white papers in the Integration.chm. See the next section, New Documentation, for details.
New Documentation
There are now four parts to the SDK documentation. They are shown in the following table.
Part |
Location |
Description |
Integration |
%SDKDIR%\Docs\Integration\Integration.chm |
White papers and Java package reference information for integrating Java with Internet Information Server (IIS), Microsoft® Transaction Server, Microsoft® Visual Studio®, Microsoft® Data Access Components (MDAC), and Microsoft® DirectX® Media. |
Javadocs |
%SDKDIR%\Docs\Javadocs\Javadocs.chm |
Java 1.1 Core API. |
SDKdocs |
%SDKDIR%\Docs\Sdkdocs\Jsdk32.chm
www.microsoft.com/java/sdk/32/ |
Microsoft SDK for Java. |
WFCdocs |
%SDKDIR%\Docs\WFCdocs\WFC.chm |
Documents Windows Foundation Classes. |
Samples |
%SDKDIR%\Samples\Start.htm |
Samples included in the SDK for Java. |
Application Foundation Classes (AFC) Have Moved
AFC is not included in the SDK for Java, version 3.2. Versions 1.0.2 and 1.1 of AFC, the AWT2AFC tool, and all AFC documentation (in HTML Help format) are now available in the new Microsoft SDK for AFC
. AFC samples are included in both the SDK for Java and SDK for AFC. To run the AFC 1.0.2 samples, you must install the SDK for AFC and run AFC 1.0.2.