Deployment Types

Strictly speaking, the WindowedApp app isn't platform independent. The source code certainly is, relying as it does on AWT user interface calls. However, the .EXE file that results from compiling this source code under Visual J Plus Plus v6 is as firmly tied to Microsoft Windows as any other .EXE file that you might encounter; in fact, in some ways it's more firmly tied.

The reason for this is that the .EXE file generated by Visual J Plus Plus v6 does not include the AWT class library. This library is tucked safely away in a Windows subdirectory known only to the VM and Java computer geeks. As a result, our Visual J Plus Plus .EXE files will only execute on a Windows machine that has Microsoft Internet Explorer or the Java SDK installed.

Visual J Plus Plus v6 supports other deployment options, however. For one thing, compiling WindowedApp.java generates a WindowedApp.class file whether or not it generates an .EXE file. This WindowedApp.class file can be executed on any machine for which you have an app viewer.

The viewer supplied with Visual J Plus Plus is named JVIEW. To use JVIEW, you would enter the following on the command line:

jview WindowedApp.class myfile.txt


Alternatively, you can use the app viewer that comes with the Oracle Java Development Kit for the PC. You can also execute the same .class file on a UNIX machine using a viewer intended for that environment.

I'll have more to say about deployment in the discussion of applets and the Web later in this tutorial. Meanwhile, it is a good idea to keep in mind exactly what you mean by platform independence in the context of Visual J Plus Plus v6 executable files. Comments