Click Here to Install Silverlight*
United StatesChange|All Microsoft Sites
MSDN
|Developer Centers|Library|Downloads|Code Center|Subscriptions|MSDN Worldwide
Search for


Advanced Search
MSDN Home > MSJ > April 1999
April 1999

Microsoft Systems Journal Homepage

Editor's Note

We'd like to take this opportunity to shed some light on the Java topics making the news. Microsoft has been respectfully following a preliminary injunction issued by the Federal District Court on behalf of Sun Microsystems. This injunction concerns our implementation of Java and affects the Microsoft Java virtual machine and Microsoft Visual J++. Specifically, we must implement the Java Native Interface (JNI) in our virtual machine, and "un-default" certain Microsoft-specific keywords in order to be in compliance with the Judge's order.
The virtual machine is, of course, included in Windows and other Microsoft products. Since we've been emphasizing Windows 2000 here in the pages of MSJ, we'd like to let you know that even though the Windows 2000 beta 2 is not compliant, and Microsoft can't give you a copy of it after February 15, you can continue to use it if you already have it. Regardless, Windows 2000 beta 3 will be compliant when it's released—hopefully later this Spring—and it's the version you want to work with.
For Visual J++, Microsoft language extensions and compiler directives can no longer be the default. Examples are the keywords delegate and multicast and compiler directives such as @com. These are Microsoft extensions to the Java language and are used in programming with J/Direct and the Windows Foundation Classes (WFC).
The delegate keyword is typically used in WFC to build event handling mechanisms. It is used in a class definition that extends com.ms.lang.Delegate or com.ms.lang.- MulticastDelegate. Delegates provide an object-oriented, type-safe, and secure method to reference objects and their methods with the simplicity of function pointers. A regular delegate refers to a single method of an object instance. If the multicast keyword is used when invoking a delegate, the methods of the class instance are executed synchronously and in order—a handy option for developers, albeit a Microsoft extension.
The @com compiler directive is used as a comment tag at the beginning of your COM class definition. When the compiler hits this directive, it uses the tag information to set up your class in the registry—yet another handy option that's specific to Windows.
Hopefully this case will soon be resolved, but when we created a simple Windows-based application using the compliant version of Visual J++, we were saddened to see the following legalese creep in:
Note: Use of the Microsoft language extensions for Java results in compiled code that will run only on Windows systems with the Microsoft Virtual Machine for Java installed and may not run on other virtual machines. The Microsoft Virtual Machine for Java is installed with Windows 98 and a freely redistributable version is included with this product. While future versions of Microsoft Java's development tools may be prohibited by court order from incorporating keyword extensions and compiler directives not contained in Sun's Java language specification, any code written and compiled with this version of the product will be unaffected by such a ruling.
Rest assured that Visual J++ 6.0 is not being recalled, and you certainly can continue to use Visual J++, J/Direct, and WFC.
From the get go, Microsoft wanted to give you choices. It makes sense to us that if you want to use Visual J++ to create the best-optimized app for your Windows customers, then WFC and J/Direct are the way to go. Hell, for the past two years, we've captured PC Magazine's Editor's Choice award for best Java support.
The modified, compliant version of the Microsoft VM can be found at http://www.microsoft.com/windows/ie/download/jvm.htm, while Service Pack 2 for Visual J++ is located at http://msdn.microsoft.com/vstudio/sp/default.asp.

© 2015 Microsoft Corporation. All rights reserved. Contact Us |Terms of Use |Trademarks |Privacy & Cookies
Microsoft