"Pitfalls" article receives attention from JavaWorld readers

Read your peers' reactions to John Zukowski's articles on the Sun/Microsoft struggle over Java: "How to avoid potential pitfalls of Microsoft's non-standard SDK for Java" and "What does Sun's lawsuit against Microsoft mean for Java developers?"

John,

This is hard to believe -- or maybe not so hard to believe. This article is an advocacy piece masquerading as journalism. Who is the Deep Throat for this from Sun? By the way where does JavaWorld get its funding?

Stephen Vago

Stephen, Actually, if you read the author's bio at the bottom of the article you'd realize John Zukowski is not writing for Sun, but for himself, a proficient Java developer and author of numerous Java books and articles. His perspective largely mirrors that of JavaWorld readers as a whole. JavaWorld is published by Web Publishing Inc., the online publishing unit of International Data Group -- the world's leading publisher of computer trade magazines. Sister publications include PC World, ComputerWorld, InfoWorld, and NetworkWorld. Like all IDG pubs, JavaWorld adheres to high editorial standards. In fact, the Computer Press Association honored JavaWorld as one of only three finalists in the Best New Publication (of any kind -- print, online, broadcast) category of the annual Computer Press Awards. Like nearly all computer trade magazines, JavaWorld relies on advertising revenue. A quick look at our advertising base reveals that Sun spends relatively little on JavaWorld ads. If any single vendor can be singled out as our primary fund-provider, it is Microsoft, one of our biggest advertisers. Michael O'Connell

Editor-in-Chief

JavaWorld

Stephen Vago replies:

I didn't assume at all that the author worked for Sun. However he seems to have knowledge of details of the Java compliance suite, which Sun has heretofore not made public.

The question about funding is not triggered by just this one article but about the overall coverage of Java issues by your magazine. Obviously, I subscribe and find it of great value as a Java developer (one who owns and professionally uses both Symantec Cafe and Visual J++). But almost all coverage seems to hold the view of Java that is advanced by Sun. I don't recall a single article that ever criticized anything Sun has done with Java, either from a technical perspective or from a competitive perspective. If you can refer me to one or more such articles then I will gladly rethink my position.

Stephen Vago

John Zukowski responds: Stephen, The article you responded to is based on information made public from the press teleconference on October 7, 1997. (See http://java.sun.com/pr/1997/oct/transcript.html for a transcript.) I haven't seen the compliance suite. I focused on specifics from the teleconference that others ignored. As the transcript indicates, Carla Schroer mentions the packages that failed compliance, while Alan Baratz discusses Microsoft specifically failing the signature test part of the compliance tests. While I have seen mention of the specific packages that failed in some other articles, I don't recall seeing any mention of the signature test failure. I thought the readers of JavaWorld would be interested and understand this. Other people who covered the news might have thought differently of their readers. If you just want one article that is critical of Sun, the obvious candidate is Daniel Steinberg's "Java development on Macintosh -- is it viable or not?" in the August issue. Using the topical index at http://www.javaworld.com/common/jw-topicalindex.html, I was able to locate http://www.javaworld.com/jw-07-1997/jw-07-javamac.html fairly quickly. I'm sure there are more. John

John,

I really enjoyed your article. I have a question: Do you know where one can find a list of the classes/methods from the Core API that Microsoft has modified? It would be a service to your readers to let us know precisely what methods to avoid.

Much thanks,

Brian Bartell

Brian, I haven't seen a list posted publicly yet. However, to give you an idea of one of the changes, if you look at the java.awt.Font class, Microsoft's Font class adds a public method called getNativeData(). Microsoft also made an instance variable public that is private in Sun's implementation. John

John,

Is there a list of the methods and fields Microsoft added to its java libraries?

Adam

John,

Great piece! I posted the URL to the mailing list for the Java Lobby, but you'd probably get a bunch of interest if you posted there too. See http://www.javalobby.com.

I'd like to see you put up a "FAQ" on this subject with headings like "Building 100% Pure Apps is MS JSDK" and "Building "100% Pure Apps that run under IE 4.0."

Michael Sick

John,

I read your article on the differences between Microsoft's SDK and Sun's JDK. This is something that really interests me at the moment, and I have a question about your research. You said:

"There is an exception to this com.ms avoidance rule though: Microsoft's Application Foundation Classes (AFC) in com.ms.ui (see Resources) are written in Java. So you can use them. However, if your users are not using IE 4.0, you will need to provide them separately."

This leads me to think that AFC is 100% pure Java. I was wondering if you have verified that AFC is pure Java by trying to run AFC apps on a non-Microsoft platform? Thanks for your time.

Jeff Sider, Java Consultant

SIDC Software Development Inc.

John,

Great article on MS Java pitfalls. Can't get much timelier than that. However, I wanted to point out that http://www.stinky.com/java/msdiff.txt lists a number of differences that are not listed in your (very good) article. The URL above claims that there are also extra methods in

java.lang.reflect.Method,
                                       java.lang.VerifyError,
                                       java.util.Locale,
                                       java.awt.Label, 
                                       java.util.ResourceBundle,
                                       java.awt.ScrollPane, 
                                       java.awt.Frame, and
                                       java.awt.Window.
                                      

You may want to check into this and update your article as appropriate.

Charles Kerr

Charles, Thanks for the pointer on the diff file. Looking in the file, I don't see any mention of the problems in java.awt.Label/ScrollPane/Frame/Window. Let us know what your source was for these. John

John,

Is it possible to replace the Microsoft VM with the JRE from Sun? If so, how? Can it be done without a client install?

Steve Potell

John,

For fun, I suggest you have Zukowski do same analysis on Netscape's JDK 1.1 beta...

Charles Fitzgerald

Microsoft Java Team

http://www.microsoft.com/java

John,

Great article on the SDK differences. This was a real service to the community.

Thanks and keep up the good work,

Mike Daconta

John,

Just a short note on one part of your article. Maybe it's useful information that can be incorporated into the article. You write:

Another difference is that the Dialog class will accept a null parent Frame parameter for Microsoft, while the Sun JDK throws an IllegalArgumentException.

This throwing of an IllegalArgumentException has been driving me crazy for quite some time, because in Patrick Chan's and Rosanna Lee's The Java Class Libraries -- An Annotated Reference (which seems to be quite official as it is part of "The Java Series ... from the source") it says:

: public Dialog(Frame parent, boolean modal) : [...] : parent The parent of the dialog. Can be null.

And you write,

Hopefully, any improvements made by Microsoft will make their way back into the JDK and vice versa.

Yep, 100% pure truth. ;-)

Thomas Pluempe

P.S. Thanks for the article, I asked Sun to provide that information, but they have not yet answered.

Thomas, With regards to the problem you are having, this is listed as an incompatible change in the AWT 1.1 API. See http://java.sun.com/products/jdk/1.1/docs/guide/awt/IncompatibleChanges.html for a complete list. The Chan/Lee book you have is based on Java 1.0, so it still lists the old way. John

John,

The package name of "com.ms.xxxx" doesn't even follow the de facto standard of inverting one's domain name. A naive user might contact Morgan Stanley Dean Witter if they found problems with the Microsoft code, since Morgan Stanley is the apparent owner of the "ms.com" domain.

Mark Smith

John,

Cool article.

There are a few points I'd like to make. (I've done my own very quick comparison between SDK and JDK1.1.4, and came up with the same conclusions as you.)

You wrote:

There is an exception to this com.ms avoidance rule though: Microsoft's Application Foundation Classes (AFC) in com.ms.ui (see Resources) are written in Java. So you can use them. However, if your users are not using IE 4.0, you will need to provide them separately.

While trying to run one of the AFC demos, I discovered that AFC uses the SystemColor.appWorkspace field! So, AFC is not exactly portable, you have to be using the Microsoft JVM.

:)

Matt Quail

John,

Excellent article, John.

I want to point one thing out though. AFC is dependent on some of the enhancements that Microsoft added to the java.* packages. I know this because I tried to extract the AFC packages and move them to another platform. It complained about not finding some of the methods missing in the toolkit package. Microsoft plans to rectify this with the cross-platform version of the AFC package, but this will be a separate version of AFC. It seems to me that this actually makes code maintenance more difficult for them.

If Microsoft would simply eliminate the new classes and methods from the java.* packages, I would be very satisfied with its 1.1 Java implementation. I know I don't speak with the majority of Java developers though. I personally don't feel that RMI is that important. I'd prefer a CORBA add-on. Besides, I can still perform the same types of remote interfaces with CORBA. I also don't think the JNI/RNI issue is relevant. Anyone trying to write "pure Java" is probably not interested in writing native code.

Thanks again.

Bill Hyman

John,

Have you had any success extracting the classes.zip file from IE 4.0 or SDK 2.0? Microsoft seems to put the classes in a .lib file which is a total pain!

All I really want are the classes proper.

Thanks.

Madhu Siddalingaiah

Madhu, If you install either, the classes.zip file is located (on my NT4 box) in \winnt\java\classes.zip. If you prefer not to install, you can get the CAB Development Kit from Microsoft and use their CAB file extractor tool (whose name I don't recall -- although this is supposed to be included with Win 95 systems). This will allow you to extract the classes.zip file from the .CAB files that you d/l from Microsoft for the software. Its actually inside a cab file inside a cab file, vs. just one level deep. Good luck,

John

John,

I just read your article at http://www.javaworld.com/jw-10-1997/jw-10-sdk.html, and I am curious about the applet on URL http://www.javasoft.com/docs/books/tutorial/intl/datamgmt/index.html

I'm running IE 4.0, and the applet says "Your browser can't run 1.1 applets." Did you check the java.text classes, and in particular the Format and all related classes? I didn't find a reference to it in your article.

Regards,

Filip Van Laenen

John,

Saw your article about compatibility problems in the JVM that ships with IE 4. I understand that the JVM that ships with Communicator 4 has similar problems of modified java.* class libraries. Do you have any plans to do an article on the Communicator compatibility issues?

Also, I just picked up a copy of Symantec Cafe 2.0. The release notes seem to indicate that there are still some pretty serious bugs in the Sun awt.* 1.1 class libraries. For example, mousedown events are lost. What's a Java developer to do?

Richard M. Smith

Richard, Thanks for the comments. If you look at the very bottom of the article, there is a sidebar mentioning the Java 1.1 patch for Communicator 4.0 differences. Regarding Cafe, I just got the 2.0 release yesterday. Where do they mention this? You might consider taking a look at Sun's Bug Parade (http://developer.javasoft.com/developer/bugParade/) and vote on the ones most important to you. John

John,

You might consider an article on the techniques of writing code that is tolerant of platform differences.

Let me give you an extreme example. This was Smalltalk, but the ideas are the same. At Polymorphic Software Inc. we had a transparent persistence system called Tensegrity and a direct manipulation graphic framework called GF/ST.

The company was bought by ParcPlace and the products have essentially disappeared, but that's another story.

GF/ST lives on in the form of the jKitGO from ObjectShare.

Both of these products were written with a common code base in the Envy repository and had versions for VisualWorks, VisualSmalltalk and IBM Smalltalk. About 15 percent of each were adapters to each of the platforms. But 85 percent was common.

Both of these products were in pretty difficult programming areas. And these three Smalltalks were vastly more different than the relatively small differences that are happening in Java.

The solution is based on good object design and on the power of the Envy code manager.

There are other Smalltalk third party companies that got pretty good at doing the same stuff.

All of us came to the same conclusion -- designs for portability are good designs. If it is done well, then the result is very strong stable code.

Ed Shirk

Ed, Thanks for the note. Sun actually includes lots of the necessary techniques in the 100% Pure Java cookbook (like not using "/" or "\" in a filename, but file.separator instead). The techniques do go beyond that and I'll think about it for a future article. John

John,

Related:
1 2 Page 1
Page 1 of 2