Visual J++ 6.0: Doing Java the Windows Way

If you've used Microsoft Corp.'s J++ 1.1 Java environment with its Visual C++-style interface, be prepared for a change. If you've used any of the dozens of Java RAD tools built around platform-neutral JavaBeans, be prepared to stifle a scream. But if you've used primarily Visual Basic, Delphi or any other similar Windows-only RAD tool, be prepared to slip into a development environment that fits you like your favorite chair. We looked at Microsoft's Visual J++ 6.0 and found a lot to appreciate, but only if the portability trade-off meets your company's needs.

We installed the J++ Technical Preview #1 without incident on a Compaq DeskPro P100 with 64 MB of RAM running Windows NT 4.0 Server, as well as on a Cyrix MediaGX P180 running Windows 95.

J++ 6.0 is a significant break with the Java development community, in that the primary component model supported by J++ is not JavaBeans but a COM-oriented framework known as Windows Foundation Classes (WFC). Java's platform-neutral peer controls have been replaced with direct calls to the Win32 API. So if you are looking for a Java tool to create traditional platform-independent Java applications, this is not the tool for you.

Familiarity with Visual Basic will take you far in the J++ 6.0 IDE. The two development environments look and work identically. As in Visual Basic, we designed forms by dragging ActiveX controls from a palette. Clicking on the control allows the programmer to attach code to any number of control events. Unlike other Java tools, there is no new event model to learn. Long-time Windows programmers will be immediately productive, because the Windows messaging architecture that they've worked with for years remains unchanged.

All the ActiveX controls necessary to assemble a basic Windows NT application are provided, with very little fluff. Microsoft supplies a pallet of 24 WFC controls. While users can, in theory, add other ActiveX controls to the tool pallet, our attempts to use non-WFC controls in a form met with only limited success.

IntelliSense provides excellent on-the-fly syntax checking, prompting you for function parameters as you type. IntelliSense even works on polymorphic functions and Java packages, significantly increasing your ability to write code without referring to manuals or online help.

Database functions are handled by data-aware controls, ODBC and Active Data Objects (ADO). ADO allows for three-tier and briefcase-style database applications. The preview copy did not include enterprise database tools such as a report builder, but we expect the final set of database tools to be very similar to Visual Basic.

Internet capabilities include an HTML editor, which also allows forms to be cobbled together from a palette of GUI objects. A convenient tabbed form switches between HTML design, source and preview modes. Using WFC, programmers can directly control Dynamic HTML via Java code. When debugging Internet applications, the J++ debugger can debug both Java and HTML script languages on both a local machine and remote machines. We compiled and deployed a simple Java 1.1 Applet originally created with Visual Café, and it ran successfully.

J++ classes can immediately become COM automation objects without any change. Pressing a button generates a Globally Unique Identifier for the class, while deployment automatically registers the component and can optionally package it for delivery over the Web. We had no trouble using COM objects created with J++ from Visual Basic, Delphi and C++ Builder.

Like other Java environments we've used, the design-time performance was somewhat sluggish when switching forms, with the hard drive spinning frequently despite 64 MB of memory. When we first launched a simple J++ COM object from within a Visual Basic program, the machine struggled, presumably because the whole Java Virtual Machine has to be executed first. A nonscientific benchmark showed that J++ applications performed at least as well as those written in compiled Visual Basic.

While J++ is capable of creating portable Java solutions, many other products exceed Microsoft's support for standards. Still, we found J++ to be the first Java environment where long-term Windows programmers will be instantly comfortable and productive, and retain access to all of their favorite controls and applications. J++, which Microsoft claims will ship at the end of the summer, is a solid proprietary Windows RAD tool that just so happens to use an industry-standard language