Programming Windows: Hello, Visual J++ (Premium)

Visual J++ is a historical footnote today, but it’s fascinating to go back and see what Microsoft did with the Java platform.

There were two versions of Visual J++, Microsoft’s Java developer environment, Visual J++ 1.0, which shipped as part of Developer Studio in 1996, and Visual J++ 6.0, which shipped in Visual Studio in 1998. I don’t recall ever using those tools when they were current. But I’ve since used both, and am impressed with the quality of Microsoft’s work.

I’m even more impressed by the extent of Microsoft’s work to seamlessly integrate Java into its developer toolset and with its then-current platforms. Visual J++ 1.0 allowed developers to write Java applets that could access COM components via ActiveX. And Visual J++ 6.0 included a complete framework, called the Windows Foundation Classes (WFC), for using Java to create Windows applications.

So what did Visual J++ and the Java code one created with it look like?

As you may recall, a basic Java console application is easy reading, even to the non-programmer:
class hello
{
public static void main(String args[])
{
System.out.println("Hello, Java!");
}
}
Creating a similar applet for the web was a bit more tedious, as I quickly discovered. I used Visual J++ 1.0 on Windows NT 4.0 to create the following basic Java hello, world applet that I ran in Internet Explorer 3.0, the earliest version of Microsoft’s web browser to support this technology. (This code is based on an example from Microsoft’s Visual J++ documentation.)
import java.awt.Graphics;

class HelloJPP extends java.applet.Applet
{
public void paint(Graphics g)
{
g.drawString("Hello, Visual J++!", 50, 25);
}
}
The code is readable enough, and it is basically a graphics-based way to output similar text, this time inside the browser. And it works as you might expect. (At least in IE 3.0. It does not work in Netscape Navigator 2.0.)

Next, I tried Microsoft’s Java Applet Wizard, which was, at the time, to Java as was the Application Wizard in Visual C++. This multi-stage wizard allowed you create both applets and basic standalone Java applications, using an impressive array of options. You could enable support for multithreading, for various mouse events, animation, and more, and the wizard would generate all of the code scaffolding required.

The resulting code was a bit convoluted, and it was spread over multiple source code files. But as was the case with MFC, it allowed developers to worry more about the purpose of their applets and applications, and less about the boilerplate code that was also needed.

This code generates some text, as before, and also a spinning earth animation, since I specified that I wanted animation in the wizard.

With Visual J++ 6.0, Microsoft really turned things up a notch: Here, Microsoft finally created that thing that so many C++ developers had wanted, probably still want, a rapid app...

Gain unlimited access to Premium articles.

With technology shaping our everyday lives, how could we not dig deeper?

Thurrott Premium delivers an honest and thorough perspective about the technologies we use and rely on everyday. Discover deeper content as a Premium member.

Tagged with

Share post

Please check our Community Guidelines before commenting

Windows Intelligence In Your Inbox

Sign up for our new free newsletter to get three time-saving tips each Friday

"*" indicates required fields

This field is for validation purposes and should be left unchanged.

Thurrott © 2024 Thurrott LLC