Microsoft Visual J++ Frequently Asked Questions


Microsoft Corporation

What is Visual J++?

Microsoft® Visual J++™ version 1.1 is a Microsoft visual Java development environment. Using the same innovative user interface found in Microsoft Visual C++®, Visual J++ includes:

  • A visual debugger.
  • Wizards to build applets and ActiveX™ controls.
  • A class viewer for easier comprehension of Java objects.
  • An advanced editor with syntax highlighting.
  • A source-code compiler that translates at a rate over 10,000 lines per second.
  • An online tutorial.
  • The Microsoft Press® book, Learn Java Now.
  • Microsoft Internet Explorer with Java support and redistribution rights.
  • An advanced Just-In-Time (JIT) compiler for the fastest applet execution.
  • A Java class hierarchy chart.

Visual J++ is certified as Java Compatible and allows users to build cross-platform applications, with specific optimization for the most common environments, such as Microsoft Windows® 95 and Windows NT® 4.0 operating systems, without affecting portability.

Can you distinguish the terminology and product names in Java?

Confused? There are many terms and product names in the Java world: Java, Virtual Machine (VM), JavaScript, JScript™, and Visual J++, just to name a few. Here's a quick rundown of some of the terms and product names commonly heard in "Java-speak."

  • Java versus JavaScript
    Java is a programming language that produces compiled output called applets. JavaScript is a scripting language that is used in a Hypertext Markup Language (HTML) page. If you view the HTML source for a Web page and you see an applet tag, that tag is pointing to a class file which is the compiled result of Java source code. If, on the other hand, you view the HTML source for a page and you see actual Java code, that is JavaScript. The browser reads the code line-by-line and interprets each line.
  • JavaScript versus JScript
    JScript is Microsoft's implementation of JavaScript (compatible with Netscape Navigator) which can be run on both the server side and within Microsoft Internet Explorer.
  • Microsoft Virtual Machine (VM) for Java
    Java source code is compiled to an intermediate "bytecode" which is stored in .class files. These .class files are machine independent. This enables the .class files to be loaded by browsers on many computer platforms. However, because the .class file is not aware of the hardware it will eventually be running on, it needs to go through an interpreter before it can be run. This final stage takes place in the Microsoft Virtual Machine for Java. This is where Java programs are executed.
  • **Visual J++
    **Visual J++ is not a language; it is a development environment for writing Java applets and applications. Why is it called "Visual J++?" Just as Visual C++ was a progressive move for the C language, Visual J++ provides a progressive move for the Java language. Visual J++ is one step better than Java. It's Java plus the Component Object Model (COM). The Visual J++ compiler and Type Library Wizard allow Java programs to access language-independent COM libraries and controls.

Does Visual J++ version 1.1 support the Sun JDK version 1.1?

Visual J++ version 1.1 does not include the Sun Java Development Kit (JDK) version 1.1, but it does support many of its features. We didn't include the Sun JDK 1.1 because it was still in beta when we released Visual J++ version 1.1. We don't believe in releasing a retail product with beta code in it. We will provide a new JDK 1.1–compatible compiler as soon as it is available. Many of the features of the Sun JDK 1.1 have been in Visual J++ since version 1.0, including the international and Unicode features, the digital signing of applets, the JAR packaging capability (our .cab files), the Java Native Method Interface capabilities, and many of the performance enhancements. In addition, all of the capabilities of JavaBeans are already available through our ActiveX support.

Does Visual J++ compete with Java?

Absolutely not. Applications built with Visual J++ will work with any major browser, including Internet Explorer and Netscape Navigator. Microsoft has fully embraced the Java language and is making it even more powerful by allowing Java to easily integrate with existing applications and databases. Microsoft has a license agreement with Sun to create the reference implementation of Java for Windows, and Microsoft has freely licensed this technology back to Sun so that they can distribute it to other browser and development tool vendors.

Does Visual J++ create cross-platform code?

Absolutely. Visual J++ creates 100 percent Java-compatible code that runs on every platform that supports a Java VM (including Windows 95, Windows NT, Solaris, the Apple® Macintosh®, and others).

Does Visual J++ have the ability to visually create Java forms?

Yes. The resource editor allows you to visually layout your application's interface. The resource editor is the same editor that is used in Microsoft Visual C++, thus making it familiar to a lot of people. In addition, there is another resource editor you can use to convert existing Microsoft Visual Basic® and Visual C++ forms into cross-platform Java code. This helps you create programs faster, and because it's a familiar interface, your customers will appreciate it as well.

What advantages does Visual J++ offer over other visual Java development environments?

Visual J++ is the best Java development environment for many good reasons. Here are just a few:

  1. The best debugger

    To resolve application problems quickly, a graphical debugger is an essential part of a programming language. For a new, object-oriented language such as Java, it is imperative that developers have the best debugger available to resolve problems quickly and overcome the Java learning curve easily. Visual J++ offers the best debugger with such unique capabilities as:

    • Debugging multiple applets running simultaneously within the target browser
    • Bytecode disassembly
    • Bytecode-level stepping and tracing
    • Assigning values to variables
    • DataTips® to allow developers to get the value of a variable or a highlighted expression during testing
    • AutoTab, an expandable tree control to show expressions of interest around a program counter
    • Complex type expansion in a variables window, using an expandable tree control format
    • Highlighting changes made in all appropriate windows
    • Stepping out of nested levels during debugging
    • Debugging code without source-line information
    • Stopping debugging at any time while target process is running
    • Setting breakpoints at any time while target process is running
    • Showing parameters in the call stack
    • Evaluating arbitrary or complex expressions
    • Debugging COM objects written in Java
  2. The best Java source code compiler

    • Compiles at a rate of over 10,000 lines per second
  3. The easiest way to learn Java

    Java is a subset of C++ functions and inherently complex. Visual J++ gets you over the Java learning curve with these unique facilities:

    • Wizards to provide visual instructions for creating applets
    • Interactive help and an online tutorial
    • Complete online documentation
    • An interface similar to other Microsoft development products, such as Visual C++. Because Visual J++ uses the same development environment (Microsoft Developer Studio™), you spend your time learning Java instead of how to use your development tool.
    • A large selection of Java examples
    • Full compliance with all Java standards
  4. The most comprehensive functionality

    Visual J++ is more than just a Windows-based tool to the character-based Sun JDK. Visual J++ includes everything you need in one Java solution:

    • The Visual J++ ClassView helps you to understand the relationship between Java classes, methods, and properties
    • The ability to paint forms and menus with the resource editor—or import existing forms developed with other Microsoft products, such as Visual C++
    • Integrated database access using Remote Data Objects (RDO) or Data Access Objects (DAO)
    • Freely distributable copies of Microsoft Internet Explorer, with the most efficient JIT applet compiler for the easiest and fastest end-user navigation over the Internet or intranet
    • Support for ActiveX controls to enhance your existing investment in desktop applications and easily add efficient, interactive content

How does the ActiveX support in Visual J++ benefit me?

The ActiveX support in Visual J++ benefits you in a couple of ways. First, it allows you to reuse existing code from other languages without having to rewrite code from scratch. For example, you can reuse an ActiveX control or an RDO or DAO database. Visual J++ version 1.1 includes a new database wizard that makes it a breeze to hook up to an RDO or DAO database. You can create high-performance graphics programs using DirectX. Second, it allows you to create code that can be reused not only in a browser, but also in other tools such as Microsoft Visual Basic, Visual C++, Microsoft Excel, and Powerbuilder and Delphi. Now you can bring your Java programming to a much wider audience.

Isn't ActiveX technology just for Windows? What if I want to create cross-platform applications and applets?

ActiveX technology is designed to be cross-platform. Metrowerks has announced that they are including ActiveX capability in the Java VM on the Macintosh. This will be available in Microsoft Internet Explorer 3.0 for the Macintosh.

What platforms will Visual J++ run on and target?

Visual J++ requires Windows 95 or Windows NT for development only. The Java code that it creates, however, runs on any platform that has a Java VM.

How does Visual J++ help make ActiveX integration easier?

Visual J++ has a wizard that reads the type libraries of COM objects (including ActiveX controls) that you choose to import. This is what lets you easily use the methods and properties of COM objects as if they were simply other Java classes.

How does the Visual J++ compiler compare to other Java compilers?

The Visual J++ compiler does everything that the other compilers do, plus it allows for ActiveX integration and has unparalleled compilation speed. The Visual J++ compiler is currently compiling over 10,000 lines of code a second.

Is the Visual J++ compiler the same as a JIT compiler?

No. The Visual J++ compiler is part of the Java development tool. It compiles Java source code into bytecode. The JIT compiler is part of the Java VM. It accelerates the run-time performance of your Java code. Visual J++ includes a JIT compiler that is freely distributable.

Will Visual J++ let me build both applets and applications in Java?

Yes. If you can do it in Java, you can do it with Visual J++!

What's the difference between a JavaBean and a Java applet?

A JavaBean is a reusable software component for the Java development language, conceptually similar to the way ActiveX controls are used in building a Visual Basic application. JavaBeans can be combined to create applets, which are miniature applications that run in a Web browser.

For development of the JavaBeans themselves, see the JavaBean Development Kit (BDK) at the Java Web site (

If I get the compiler and documentation for Java in the Microsoft Java SDK, why do I need Microsoft VJ++?

This question, while logical, is the equivalent to asking "If I have stones in my yard with which to make tools, why do I need to go to the hardware store?"

While it is certainly possible to do Java development with the components given in the free Java SDK download, developers will find significant time savings and minimized hair loss by using the Microsoft Developer Studio interface, the debugging tools, the color-coded code editor, and the project window that comes in Microsoft Visual J++.

How does ActiveX relate to Java?

ActiveX does not compete with Java. Developers can create ActiveX components using Java and can also use ActiveX components from Java.

How does the Active Platform relate to Java?

The Active Platform includes and interoperates with Java technology. Java is a great language for creating ActiveX components that plug into the Active Desktop or into the Active Server.

What is the Java AWT?

The AWT is Java's Abstract Windows Toolkit, the set of classes by which you can develop code once and instantly port it to many platforms. To utilize the AWT, import it in the beginning of the project using import java.awt.*. This will give you TextComponents, Buttons, Scrollbars, Canvas, CheckBoxes, Lists, and Labels, for instance. Microsoft Visual J++'s recently announced Application Foundation Classes (AFC) work as an extension of the AWT, bringing the Java development environment closer to Microsoft Visual C++ with it's Microsoft Foundation Class (MFC) libraries.

Does Visual J++ support JDBC?

Visual J++ supports JDBC, but does not include any of the drivers or classes for it. As an alternative, Visual J++ includes DAO and RDO for access to client server databases. These database interfaces provide a lot of capabilities that JDBC is lacking, including updating, scrolling, database administration, and nested transactions. We have found that most firms are very reluctant to put their business rules up on the Internet, which JDBC encourages you to do. In an Intranet or a 3-tier Internet scenario there is little reason to restrict yourself to the limited capabilities of JDBC.

Some third-party tools for off-the-shelf ODBC and JDBC database connectivity for use in conjunction with Visual J++ are available from:

JetConnect (
NetDynamics (
JDesignerPro (

What's the difference between the Java VM (Virtual Machine) and a JIT (Just-In-Time compiler)?

The Java VM is what executes Java programs. The Java VM comes bundled with the more advanced Web browsers, such as Microsoft Internet Explorer, or in the Java SDK. The VM itself is a virtual processor emulated in software. The instructions, called Java bytecodes, for that virtual processor are the same no matter which operating system the VM is running on. The virtual machine reads the bytecode and executes the native instructions appropriate for the local operating system. This is what gives Java its machine-independence.

JITs are plugged into the Java VM. When the VM executes a method in a class or object, it passes bytecodes to the JIT, which then compiles the bytecodes to native code on the fly. Without a JIT, the Java VM must interpret and execute each bytecode in succession—a much slower process. Consequently, a JIT significantly boosts Java performance.

Will Microsoft Visual J++ make a stand-alone Java application?

Yes. Microsoft Visual J++ 1.0 will make a stand-alone application.

To create a stand-alone Java application:

  1. From the File menu, choose New.

  2. Select Text File and click OK. A blank text window appears

  3. Type the following code into the text editor:

    Class Hello2
    public static void main (String args[] )
    System.out.println ("Hello, World!" );
  4. From the File menu, choose Save. The Save dialog box appears.

  5. Type "" and click Save.

  6. From the Build menu, choose Build Hello2.

  7. Click Yes.

  8. From the Build menu, choose Execute.

  9. Type "Hello2".

  10. Select the radio button Stand-alone interpreter.

  11. Choose OK. The Java application runs.

What things do I need to build and distribute a stand-alone Java application (as opposed to an applet)?

Once you've built your stand-alone Java application, be sure to distribute the correct pieces:

  • The Java class file, which itself is platform independent
  • The Java Virtual Machine for that platform

The Java Virtual Machine comes in the form of "jview.exe", a redistributable component available both in the Visual J++ package and in the Microsoft Java SDK. The Java SDK is available for download from the Microsoft Technologies for Java ( To control and compress the installation bundle, we recommend you use the CAB development kit included with Visual J++.

Can I utilize Remote Data Objects (RDO) technology in Visual J++?

Yes. Using the Connect To Database Wizard bundled in Visual J++ 1.1, select RDO as your method of connecting to your data source. The Wizard will generate code and a "to do" list for you to flush out the details of what you want your application to do. Visual J++ comes bundled with the RDO object libraries (msrdo20.dll) for redistribution with your Java application.

Can I utilize Data Access Objects (DAO) technology in Visual J++?

Yes. Using the Connect To Database Wizard bundled in Visual J++ 1.1, select DAO as your method of connecting to your data source. The Wizard will generate code and a "to do" list for you to flush out the details of what you want your application to do.

Does the new Microsoft Visual J++ 1.1 include extensions found in Sun Microsystems JDK 1.1?

Despite the version number, the new update to Visual J++ 1.1 does not adhere to the new JDK 1.1 specifications. At the time of development of Visual J++ 1.1, the JDK version 1.1 was still in beta and Microsoft felt it would not be prudent to release an update based on beta code. Microsoft is actively pursuing conformance with this specification and will have an update when it is ready.