Visual J++ Technology Preview 1 Readme

© 1998 Microsoft Corporation. All rights reserved.

Other product and company names herein may be the trademarks of their respective owners.

Visual J++® Readme includes updated information for the documentation provided with Microsoftâ Visual Studioä -- Development System for Windows® and the Internet. The information in this document is more up-to-date than the information in the Help system. Many of the issues outlined in this document will be corrected in upcoming releases.

This release is provided for evaluation purposes only. It contains pre-release code, documentation and specifications, and is not at the level of performance and compatibility of the final product offering.

This release is confidential and proprietary to Microsoft and its suppliers. Do not disclose or provide copies of this product or any information relating to it to any other party, or use it for any other purpose than as provided in the End User License Agreement without the prior written consent of Microsoft.

NEW   The Visual J++ Technology Preview 1 documentation contains comprehensive documentation about the Visual J++ product and preliminary information about Windows Foundation Classes for Java (WFC). For the latest technical articles on WFC, including a walkthrough of a sample WFC application, a description of WFC graphics programming techniques, and more, be sure to visit the Visual J++ Technology Preview at http://www.microsoft.com/visualj/.

Contents - Click any of the items below

Setup Issues
Documentation Issues
Development Environment Issues
Control Issues
Code Development Issues
Forms Designer Issues
Sample Issues
Wizard Issues
Windows Foundation Classes (WFC) Issues
Source Code Control
Visual Component Manager
Solution Packaging and Deployment

Setup Issues


Compatibility Issues Between Web Downloads and the Pre-Release of Visual Studio

Do not install either the web download of Microsoft Visual J++ Technology Preview 1 or any version of the standalone pre-releases of Microsoft Visual InterDev 6.0 on the same system with any pre-release of Visual Studio 6.0 Enterprise Edition. Microsoft will not provide support for such configurations.


Compatibility Issues Between the Visual J++ Technology Preview 1 or the March Pre-Release of Visual InterDev and the Pre-Release of Office 9.0

Installing a pre-release version Office 9.0 on the same computer that the Visual J++ Technology Preview 1 or the pre-release of Visual InterDev is installed will prevent all three applications from running correctly. This problem will be resolved in the final release of these products.


Interactions with Visual J++ 1.1

There are no known problems with installing this Technology Preview version of Visual J++ on the same computer as Visual J++ version 1.1, as long as you do not install them in the same directory. However, Visual J++ Technology Preview 1 does require the final version of Internet Explorer 4.01 or greater, which affects Visual J++ 1.1 debugging. This known problem with Visual J++ 1.1 debugging and pre-release versions of IE4.0 is described in the Microsoft Knowledge Base article "Q167998 Cannot Debug Visual J++ Programs On IE 4.0 Pre-Release." To view this article, see http://www.microsoft.com/kb/ and type Q167998 in the Search phrase field. To prevent this debugging problem, install Visual Studio 97 Service Pack 3 from http://www.microsoft.com/vstudio/sp3/.


New User Accounts on Windows NT 4.0 Cannot Run Visual J++ Technology Preview 1

Some functionality of this Visual J++ Technology Preview 1 may be impaired when using the product while logged in using a new user account other than the one under which it was originally installed. To workaround this problem, either use the account the product was installed from, or, reinstall the product separately for each user account on the computer.


Windows NT 5.0 Installation Not Supported by This Preview

Microsoft Windows NT 5.0 installations are not supported by Visual J++ Technology Preview 1. Setup will fail if attempted on a Windows NT 5.0 system. You must have either Windows 95, Windows 98, or Windows NT 4.0 with Service Pack 3 installed to run this product.


Windows 95 Registry Size: 64KB Limitation May Cause a Warning During Visual Studio Installation

A 64 KB limitation in the Windows 95 system registry may cause a warning to appear when you install Visual Studio.

As you install Visual Studio on a Windows 95 computer, the Installation Wizard checks the size of the system registry. If the wizard does not find enough available registry space, it will generate the following message:

Setup has detected that your system may not have enough registry database space available for a full installation. It is recommended that you read the Readme topic Windows 95 Registry Size before continuing. Continue with Setup?

You may ignore this message and proceed with the Visual Studio installation.

To increase the available space in your system's registry, consider the following:

  1. Shorten the installation path for Visual Studio.
  2. Uninstall programs you no longer use.
  3. Uninstall, then reinstall the current programs to shorter installation paths.



Documentation Issues


Class Wizard Feature Not Available

The Class Wizard described in the documentation is not available in Technology Preview 1.


queryString Property of the DataSource Control is Incorrect

In the topic "Retrieving a Set of Records" in Accessing Data of the Technology Preview 1 documentation, the reference to the queryString property is incorrect. You should set the commandText property to query the database.


Some Documented Sample Programs Are Not Available

Some of the program samples listed in the documentation are not yet available. This is a known problem and will be corrected in a later release.



Development Environment Issues


Using the Text Editor of Visual J++ or Visual InterDev on NonFar East Versions of Windows 95

If you are using the text editor of the the Web release of Visual J++ Technology Preview 1 or the pre-release of Visual InterDev, on nonFar East versions of Windows 95, you may see the text editor window behave differently when you choose nondefault script.

The text editor window may go blank or display only part of the text you have entered if you choose a font with a script that is not the default script. For example, if you change the font from Courier New (Western) to Courier New (Cyrillic) on English Windows 95, you will see only part of the text displayed.

To recover the text, on the Tools menu, click Options, then Reset All. Alternatively, choose a font with a script that matches the system.


WFC Controls Not Appearing in Toolbox

During setup, the WFC Controls group in the Toolbox is initially populated with a number of controls from WFC that can be used in the Designer to compose forms. If you customize the Toolbox, you will see additional controls listed as part of the wfc.ui.* package that are not checked in the controls list, and do not appear on the Toolbox. In this Technology Preview 1 release, these controls have not been completely tested and should therefore be used with caution. If you choose to use these controls while composing forms, note that any problems may cause the Designer or development environment to become unstable. Please save your work often, and if possible, refrain from using WFC controls that do not appear on the Toolbox as part of the normal setup.


Incorrect Package Declarations Disable Statement Completion

The statement completion feature in the editor will not function if any package declarations in a project are incorrect or inconsistent. To work around this problem, first ensure that the package declarations in all the project source files are correct and consistent. Next, exit and restart the Visual J++ development environment.

An incorrect package declaration is one that does not match the names of the parent directories in which the file is contained. For example, a source file with a package declaration of package xxx.yyy; must be contained in the directory named yyy which, in turn, must have a parent directory with the name xxx.

An inconsistent package declaration is one that does match the package declarations for all other source files in the same directory. If any source file within a directory has a package declaration, then all source files in the same directory must have an identical package declaration.


Automatic Error Detection May Parse Inner Classes Incorrectly

The text editor may sometimes incorrectly display errors for inner classes. If you see unexpected errors when declaring inner classes, indent the declaration of each inner class with one or more a tab characters. Note that this only affects the "as-you-type" error detection feature in the editor; the compiler will handle inner classes properly, regardless of indentation.


Clone, Modify, and Delete Intentionally Disabled in Class Builder

The Clone, Modify, and Delete buttons, found on several of the Class Builder tabs are intentionally disabled. The functionality they provide is not available in this Technology Preview.


Problems May Occur While Using Class Builder or J/Direct Call Builder

If you experience problems while using the Class Builder or J/Direct Call Builder, you can try unloading and reloading the builder using the Add-In Manager as a work-around.

To unload a builder:

  1. From the Tools menu, select Add-In Manager.
  2. In the Add-In Manager dialog box, clear the Loaded/Unloaded check box for the affected builder and click OK.

Reload the builder by selecting Other Windows from the View menu, or use the Toolbar button.


Class Builder, Extends Tab Can Take Several Seconds to Refresh

Each time the Extends tab in Class Builder is selected, Class Builder determines which functions have local overrides. If the number of inherited functions is large, this refresh can take a number of seconds, particularly on slower computers.



Control Issues


TrackBar Control May Not Scroll Correctly

When using the TrackBar control, calling setRange() to set a custom range may prevent your track bar from scrolling. This is a known issue and will be fixed in a later release.


Unlicensed ActiveX Controls Are Not Supported

Unlicensed ActiveX controls are not supported in this Technology Preview version of Visual J++.


Controls Using Windowless Activation Not Supported

Controls using windowless activation are not supported in this Technology Preview of Visual J++.


ADO Exception May Be Thrown when Auto-Increment Field is Bound to an Edit Box

Any field that is marked as auto-increment may generate an ADO exception if it is bound to an edit box and update is called on the bound recordset. This is a known issue and will be fixed in a later release.


clear() Method not Handled Properly in WFC Edit Control

When the clear() method of the WFC Edit control is invoked, any contents of the edit control will not be cleared as expected. To work around this problem, use the setText() method, passing an empty string as the argument.


WFC Controls not Currently Supported as Web Page Content

Problems may occur when a WFC control is placed onto an HTML document. WFC controls cannot yet be hosted directly on HTML documents. This is a known issue and will be addressed in a later release.


Singlethreaded ActiveX Controls Not Supported

Technology Preview 1 of Visual J++ does not fully support singlethreaded ActiveX controls. While the controls may be viewed on the Toolbox, placement of a singlethreaded control onto a form will cause an error dialog box to display and the control will be rejected. This is a known problem and will be corrected in a later release.


ActiveX Controls Set to Invisible at Application Startup Are Still Displayed

When starting an application containing initially invisible ActiveX controls, the controls will be displayed when the program begins rather than being hidden from view.

To work around this problem, add controls that you want to be toggled between visible and invisible to a panel on the form. Then, toggle the panel's visibility, rather than the ActiveX control.

Note   You can still use control.setVisible(false) in your code after the form is displayed to hide the control after the form appears.



Code Development Issues


Visual J++ Code Model Not Accessible to Java Authored Add-ins

The Visual J++ Code Model is not accessible to add-ins written in Java. When you write an add-in with Java, you start with a COM DLL (component) project and then add COM wrappers for the add-in type libraries. The library containing the Visual J++ Code Model cannot be COM wrapped in this Technology Preview. You can write an add-in with Visual Basic that accesses all of the Visual J++ Code Model. You can also write an add-in with Java that accesses all of the VJProjects, VJProject, VJProjectItems, and VJProjectIem objects through their base classes, but you will not be able to access VJProjectItem.Code since it is not in the base class.


COM Classes Not Registered Properly When Deployed

There is a known issue with the registration of deployed server-side COM classes for this Technology Preview release. By convention, Visual J++ registers COM classes in the registry of the local machine with the progID <ProjectName>.<ClassName>. However, when deployed, the COM classes will be registered with the progID <ClassName> on the target machine. Consequently, late-bound calls to these objects, such as from VBscript on an ASP page, may not run properly when deployed if written to run on the local machine. A work-around in this case is to add a "progID" parameter to the @com.register command in the class files that will be deployed. This progID parameter should be set to supply the proper progID of <ProjectName>.<ClassName>.

For example, consider a project Project1. The following @com line will exist in a class file that has been marked as a COM class, Class1:


    /**
    * This class is a visual component. The entry point for class execution
    * is the constructor.
    * @com.register ( clsid=C2CAD8D4-AD57-11D1-B8C9-00AA00425267, typelib=C2CAD8D3-AD57-11D1-B8C9-00AA00425267)
    */

The parameter "progid="Project1.Class1" is added to the end of the @com.register command (before the ending parenthesis):


    /**
    * This class is a visual component. The entry point for class execution
    * is the constructor.
    * @com.register ( clsid=C2CAD8D4-AD57-11D1-B8C9-00AA00425267, typelib=C2CAD8D3-AD57-11D1-B8C9-00AA00425267, progid="Project1.Class1")
    */

The resulting class file will register with the same progid on both the local machines, and when deployed to a remote web server.



Forms Designer Issues


Source Files Containing #define Cannot be Viewed in the Forms Designer

If a source file contains the #define preprocessor directive, it will not be possible to open the file within the Forms Designer. To workaround this problem, remove the #define directive prior to opening the file within the Forms Designer. Then, prior to compiling the file, reintroduce the #define conditional directive after closing the Forms Designer.


Copied Controls May Need New Event Handlers

When you copy and paste a control in the Forms Designer, the new copy of the control will, by default, have its events handled by the same handler methods as the original control. To create new handlers for the new control's events, follow these steps:

  1. Select the new control in the Forms Designer.
  2. In the Properties window, click the Events button to display the event handlers for the control.
  3. Highlight each of the handler names in the right column and, once selected, delete them.
  4. Add new handlers.

ComFailException May Occur on Forms that Use Data Access

Under some conditions a ComFailException may be thrown on the finalization of a form that uses data access. The work-around is to avoid closing the recordset and connection objects that are used on the form, and instead let the Java VM garbage collection shut the objects down. The connection to the database will still be closed, but the exception should not occur.



Sample Issues


Location and Instructions for Using Sample Programs

Sample programs included with Visual J++ Technology Preview 1 are combined into one self-extracting executable file. When extracted, each sample will be copied to its own project directory beneath the directory you specified.

To extract the sample programs

  1. Navigate to the \Samples\VJ98 directory on CD 1.
  2. Double-click on the VJSampl.exe file.
  3. Follow the instructions shown in the dialog box.

Note that each sample program includes an HTML documentation file. Refer to the HTML file for information on loading, building and running each sample.



Wizard Issues


Data Form Wizard Cannot Use Microsoft Access Databases Containing DBCS Characters in the File Name

When using the Data Form Wizard, do not select a Microsoft Access database that has DBCS characters in its file name. Doing so causes an error to occur. Subsequent wizard steps are frozen after the error occurs.


Data Form Wizard Cannot Bind Memo Fields

When using the Data Form Wizard, you may see incorrect values displayed after binding an edit box to a memo field. This problem is also exposed when the DataBinder control is used. To work around this problem, do not attempt to bind to a database memo field. This is a known issue and will be fixed in a later release.


Data Form Wizard Cannot Update Boolean Fields

When using the Data Form Wizard, you will not be able to update a bound boolean field. No error is given but the database will not be updated with the contents of the check box. This problem is also exposed when the DataBinder control is used. This is a known issue and will be fixed in a later release.



Windows Foundation Classes (WFC) Issues


DhBorderInfo Throws Out-of-bounds Exception

The copy constructor for the DhBorderInfo class will throw an out-of-bounds exception if the object passed as its parameter is not completely initialized.


DhPaddingWidthInfo Unit Fields Cannot be Empty

When using DhPaddingWidthInfo, the "unit" fields cannot be empty; they must be specified along with the corresponding "width" fields. The following example demonstrates proper initialization:


	DhPaddingWidthInfo pi = new DhPaddingWidthInfo( );
	
	pi.leftWidth = 10;
	pi.leftUnit = UNIT_PIXEL;   // must specify leftUnit
	pi.rightWidth = 10;
	pi.rightUnit = UNIT_PIXEL;  // must specify rightUnit
	pi.topWidth = 3;
	pi.topUnit = UNIT_PIXEL;    // must specify topUnit
	pi.bottomWidth = 0;
	pi.bottomUnit = UNIT_PIXEL; // must specify bottomUnit
	
	myText.setPaddingWidthInfo(pi);

 



Source Code Control

Known Problems in Source Code Control

Automatic Adding of Projects to Source Control

There is an option on the Tools menu, Options dialog box, Source Control node, that allows projects to be automatically added to source control. The default for this option is off. Do not turn on this option or your development environment may crash.


Visual Component Manager

Known Problems in Visual Component Manager

Earlier Visual Component Manager database generates Repository error.

If you attempt to open a Visual Component Manager database that was created with an earlier version of Visual Component Manager, it will fail to open, and will generate a "Wrong Repository Version" error. In order to convert the old format (Repository version 1) to the new format (Repository version 2), use the Repository Migration Wizard. For more information about the wizard search MSDN Library Visual Studio 6.0 for "Migration Wizard Overview".

Creating Repositories on SQL Server

In order to create a repository on SQL Server you must log in as the DBO (Database Owner) of the database you wish to create the repository in. If you do not you will get an error message.

In this release VCM cannot create additional repositories on a SQL server while any existing repositories located on that server are open. To create a SQL Server based repository from VCM, first close any open SQL Server based repositories before creating the new repository.

To close a repository in VCM

  1. Right-click on the repository in VCM.
  2. On the shortcut menu, point to Repository, then click Close.
Setting SQL Server Repository Rights

In order for a VCM repository located on a SQL server to be accessed by anyone other than the database owner (DBO) who created the repository, the owner of the repository or the database administrator must must grant SELECT privileges on the table RTblDatabaseVersion to PUBLIC.

To grant the SELECT privileges from the SQL Query Tool

To grant the SELECT privileges in SQL Server Enterprise Manager:

  1. On the Object menu, then click Permissions.
  2. Select RtblDatabaseVersion from the Object drop down list.
  3. Check the SELECT privileges for PUBLIC box.
  4. Press SET.
  5. Click OK.
Republishing Shortcuts

It is not possible to republish a VCM shortcut. The "Republish" item on the context menu is incorrectly enabled for shortcuts. If you attempt to republish a shortcut using this menu item it will fail and you will get an error. Also, if you attempt to publish an item to VCM with the same name as a shortcut, to the folder containing the shortcut, (which is a republish), you will get an error.

Publishing Distribution Unit projects

Publishing Distribution Unit projects (CAB, ZIP, and Self-extracting Setup projects) is not supported in this release. Attempting to publish the files associated with these projects or the project outputs will fail and may generate errors.

Copying COM components (or any component containing a typelib)

With this release, typelibs are not copied with the rest of the component. Copying a COM object, or any other component containing a typelib, will work but the copy will not contain the typelib. Attempts to browse the details of the copy (i.e. browse the typelib) will return erroneous data or an error.

Find Dialog Box Issues

Search by History

In this release finding components by component History does not work. In the find dialog if any values are set on the "History" tab the find will fail and may produce an error.

Search by "Description" or "Annotation"

In this release the ability to find a component by search either the Description text or the Annotation text has been disabled.

Wildcard character ("*")

In the VCM Find Dialog "*" can be used as a wildcard character. Entering an asterisk by itself (i.e. search for "*") will produce an error.

To search for the actual "*" enter in "/*"

Using Visual Component Manager in Visual Basic

Starting Visual Component Manager

To load Visual Component Manager in Visual Basic, you must first add VCM as a Visual Basic add-in.

To add VCM as a Visual Basic add-in

  1. Click the Add-Ins menu, then click Add-In Manager.
  2. In the Add-In Manager dialog box, select Visual Component Manager 6.0 from the Add-Ins list.
  3. Under Load Behavior, select the Loaded/Unloaded and Load on Startup check boxes.
  4. Click OK.

Solution Packaging and Deployment

Known Problems in Solution Packaging and Deployment

Several Errors Associated with Packaging and Deploying Multi-byte Character Set (MBCS) Names.

When using the packaging and deployment features, you should use only 7-bit ASCII characters for all Java class names, file names, and URLs.

There are several known problems associated with creating cabinet (.cab), ZIP Archive (.zip) and self-extracting setup (.exe) files that contain multi-byte character filenames. Similarly there are known problems with deploying files whose names contain multi-byte characters, and deploying anything to URLs that contain multi-byte characters.

Deployment of Server-side Java COM components in Java Packages

If you implement a COM class in Java, as part of a Java package, and then deploy it as a server component to be called from an ASP page, running the ASP page will fail as the COM server does not get registered. This is because the Microsoft development environment currently does not create the correct directories required for the Java package.

The Java class does not get registered. If you try to register it by hand using VJReg.exe, you get an error back saying "The internal class name "X.Y.Class1' does not match the file or directory name of class fileà' and the class cannot be loaded. If you manually create the directory structure corresponding to your Java package under the deployment root directory and then register Class1.class, it registers successfully.

Including the Virtual Machine for Java redistributables in an installer (setup.exe distribution unit)

If you create a setup distribution unit (.exe) in which both the Virtual Machine for Java and ADO redistributables are included, it will fail when it is run on the target machine, asking the user to install the Virtual Machine for Java before running the setup (.exe) again. To workaround this, do not include the Virtual Machine Java in the setup (.exe), and install it before running the setup (.exe) by running msjavx86.exe on the target machine.

Additional Files Not Installed in the Systems Folder

Files added to a setup through the Additional Files dialog box and marked to be installed in the system folder through the System folder tab (Setup Properties) fail to be installed in the system folder and are placed in the application folder instead. As a work around, add the files to the Visual J++ project instead and include them in the projects outputs dialog box (in the Visual J++ project properties dialog box).

Registration of Java COM classes packaged as a DLL fails

If you implement a COM class in Java, package it in a DLL, and then include this DLL as an additional file in a setup (.exe) file, the DLL will fail to register correctly when the setup (.exe) is run. As a work around, do not package the COM class as a DLL, but include it in the setup (.exe) as a CLASS file, and it will be correctly registered.

Introduction to Solution Packaging and Deployment

You can package components together from a project or solution and deploy the packaged cabinet (.cab) file to the Web. The .cab file can be signed for extra security. These .cab files use compression to save space. Cabinet files are also referred to as a distribution units, or DUs.

For example, you can use these features to build a .cab file or a zip archive (.zip) file that contains an applet, and then deploy the applet and HTML to the Web.

You can learn more about the following:

What is Packaging?

With the Microsoft development environment packaging feature, you can package files required to run your application (for example, Java class files, Windows .exe and .dll files, HTML pages, etc.) into easily manageable and distributable units. Examples of packaging include:

Packaging is the feature that allows you to bundle up your application's executable files into a single file (or a small number of files) so that it is easier to deploy your application to another target computer, such as the user's computer. Packaging takes your application's executable files and "packages" them into a distribution unit. In addition to your application's executable files, the distribution unit also contains information required to install and run the application.

What types of Distribution Unit can I create with Visual Studio?

With the Microsoft development environment, you can create the following distribution unit types.

How do I create a Distribution Unit?

Visual J++ exposes the packaging functionality in two separate but equivalent ways:

In-place Packaging provides a simple way to create a single distribution unit directly from Visual J++ projects. You can create a cabinet (.cab), self-extracting setup (.exe), ZIP Archive (.zip), Windows .exe file or COM .dll file by specifying properties on the Visual J++ project.

To create a distribution unit directly from a Visual J++ project, select the project properties, and on the Output Format property tab specify the type of distribution unit and either the file types (i.e. *.class) or names that are to be included in the distribution unit. You can also add additional files that are not part of your Visual J++ project to the distribution unit, and specify additional properties (such as signing).

Distribution Unit Projects are Visual Studio projects whose only purpose is to create .cab files, .zip files, or self-extracting setup (.exe) files. These projects can be added to a Visual J++ Solution (by selecting add project and then selecting Visual Studio~Distribution Units on the left hand project selection tree), and when they are built they generate cabinet, self-extracting setup, and .zip files, respectively.

Distribution unit projects include two types of items that, when the project is built, get put into the distribution unit. These items are:

The output files of a project are the set of files that are required at runtime to run the project. For example, the output files of a Visual J++ applet project would be the HTML and Java class files. The outputs of a Visual J++ project can be set by the user on the Project Properties Deployment Property Tab, where the user can specify either the file types (i.e. *.class) or names. So if you are creating a cabinet file by adding one or more Visual J++ projects to a cabinet project, you can control which specific files end up in the .cab file by modifying the file types or names on the Deployment Property Tab for the Visual J++ project.

The advantage of a distribution unit project over in-place packaging is that it allows you to package the outputs of more than one Visual J++ project into a single cabinet, self-extracting setup, or ZIP Archive. The disadvantage is that distribution unit projects are more complex than in-place packaging.

What is Deployment?

The Microsoft development environment deployment feature deploys your Visual J++ and Visual Interdev projects to Web sites for testing or production. With the deployment feature, you can set up one or more deployment targets that describe the configuration of your application in its deployed state on the server. These deployment targets can be deployed manually (by selecting deploy on the project menu), or automatically every time you run your application.

Deployment distributes your application to the platforms on which it needs to run. Visual Studio 6.0 supports the deployment of Web applications to Microsoft Internet Information Server, as well as other Web servers. Using Visual Studio 6.0 you can deploy two types of content, as the the following describes.

Creating a Deployment Target

You can set up one or more deployment targets that describe the configuration of your application in its deployed state on the server. You can browse and maintain the list of deployment targets in the Deployment Explorer window of the Microsoft development environment.

Each deployment target is associated with a single URL, to which all files and projects in the deployment target are deployed. This URL is the root node to which files and projects will be deployed. If your project contains any folders, these folders will be deployed below the target root node. For example, if your Visual J++ project contains a folder called "MyPackage" and you deploy the Visual J++ project to http://TestServer/Pete, the items in the MyPackage folder will be deployed to http://TestServer/Pete/MyPackage. The default name of a deployment target reflects the target's URL.

You can use deployment targets to deploy Web content, controls and applets that run in the user's browser (including HTML pages, ActiveX controls, WFC classes and Java applets). Additionally, if you are deploying to Microsoft Internet Information Server (IIS) you can deploy server-side components such as ASP pages, COM components, and Java classes. When you create a deployment target and specify the target URL, the development environment interrogates the Web server to determine if it can receive server-side components. If so, then the deployment target is displayed in the Deployment Explorer window with two sub-nodes representing Web content, controls, applets, and server-side components. If the specified target cannot receive server-side components the deployment target is displayed in the Deployment Explorer window with a single sub-node representing Web content, controls, and applets.

Deployment targets contain references to the projects and files that you are to deploy. In the Deployment Explorer window, the projects and files that will be deployed are listed under each deployment target. To deploy a file or the outputs of a project to run in the browser, select the Web Content, Controls and Applets node under the Deployment Target and select Add Project Outputs or Add Item from the project menu. To deploy a file or the outputs of a project to run on the server, select the Server-Side Components node under the deployment target and select Add Project Outputs or Add Item from the project menu.

Outputs of Projects

Adding a project to a deployment target causes the output files of the project to be deployed. The output files of a project are the set of files that are required at run time to run the project. For example the output files of a Visual J++ applet project would be the HTML and Java class files. The output files of a Visual J++ project can be set by the user on the Project Properties Deployment Property Tab, where the user can specify either the file types (i.e. *.class) or names. If you are deploy a Visual J++ project to a Web site, you can control which specific files to deploy by modifying the file types or names on the Deployment Property Tab for the Visual J++ project.

You cannot modify the output files of a Visual Interdev project: When you deploy a Visual Interdev project the entire Visual Interdev Web site is copied and installed to the URL specified in the deployment target.

Using Deployment to run and debug remote components

You can use the deployment feature to help debug remote components. When you are developing an application, you can set up a deployment target to deploy the application under development in the required configuration on a development server. By selecting the deployment target, and setting it as the active deployment target, every time you run your application in the development environment, the up-to-date application will be deployed and run from the development server.

You can use the debugger to set breakpoints and step through code running either in the browser or on the server.

Using Deployment to deploy your production applications

You can use the deployment feature to deploy your application so users can use it. You can set up a deployment target to deploy the application under development in the required configuration on a production server. Periodically, when the application is ready for release or re-release, you can select the deployment target and deploy it.

Modification of HTML

You can use the development environment to create cabinet (.cab) files or ZIP archive (.zip) files. When you deploy Visual Interdev or Visual J++ projects that include HTML references to .cab files or .zip files created in the Microsoft development environment, the deployment feature modifies HTML references to files in the cabinet or .zip files to be references to the cabinet or the .zip files.

For example, if you create a Visual J++ project that contains an applet and an HTML page, the HTML page will contain an APPLET tag that references the applet's class files directly. If you create a cabinet (.cab) file containing the applet's class files in the development environment, then the development environment will add parameters to the APPLET tag to ensure that the classes are downloaded from the cabinet or the .zip file.

Specifically when deploying .cab and .zip files we make the following modification to references in HTML:

Configuring a Microsoft IIS or PWS server as a target for Visual Studio Deployment

You can deploy client-side Web content (for example HTML pages, applets, and other Java classes and ActiveX controls) directly to Microsoft Internet Information Server (IIS) or Personal Web Server (PWS) without any additional configuration off the server. Simply install IIS or PWS (on NT Server or NT Workstation respectively) from the NT Option Pack.

Additionally you can use the Microsoft development environment to deploy server-side components (for example, ASP pages and COM components). In order to deploy server-side components you must do some additional configuration steps to your Web server.

To set up the target computer as a Microsoft Internet Information Server (IIS), you first need to install IIS or PWS from the NT Option Pack. To install PWS on Windows NT Workstation, or IIS on Windows NT Server

To install Posting Acceptor 2.0

To open the IIS Management Console and locate your server

  1. Open the IIS Management Console by selecting the following menu items on the Windows NT Start menu.
  2. Click Programs, then click Windows NT 4.0 Option Pack. Click the Microsoft Internet Information Server (IIS) (on NT Server) or Microsoft Personal Web Server (on NT WorkStation), and then click the Internet Service Manager.

  3. Expand the Console Root folder in the left-hand pane. Under this folder you will see an Internet Information Server folder.
  4. Expand the Internet Information Server folder. You will see your IIS server(s) listed below this folder.
  5. Expand the IIS server node for the server that you want to configure. You will see a number of nodes including a node called Default Web Site. This is the location of your server.

To set Write permission on IIS folders you want to deploy to

  1. Open the Default Web Site Properties dialog by selecting the Default Web Site, and selecting Properties from the Action menu
  2. Click the Home Directory Tab. Check that the Access Permissions "Write" check box is selected.
  3. Click Apply. The Inheritance Overrides dialog box appears, which contains a list of folders which are affected by the setting you just made. Select the folders you want to deploy to.
  4. Click OK on the Inheritance Overrides dialog box.
  5. Click OK on the Default Web Site Properties dialog box.

To confirm that the IIS Scripts folder has execute permission

  1. Expand the Default Web Site Node. There are a number of folders, including a folder called Scripts. Choose the Scripts folder.
  2. Click Properties from the Action menu.
  3. Click the Virtual Directory Tab. Check that the Permissions Radio button is set to Execute (including script).
  4. Click OK on the Scripts Properties dialog box.

Deployment Client Setup

The Microsoft development environment installs and configures all the components you need to do deployment. However if you are running the development environment on a PC which is on an Intranet, and you connect to the Internet via a proxy, you must configure Internet Explorer 4.0 to bypass the proxy server for local (Intranet) addresses to deploy.

To bypass the proxy server for local (Intranet) addresses to deploy

  1. From the Internet Explorer View menu, choose Internet Options
  2. Click the Connections Tab.
  3. In the Proxy Server section, if the Access the Internet using a proxy server check box is selected, ensure that the Bypass proxy server for local (Intranet) addresses check box is also selected.
  4. Click OK in the Internet Options dialog box.

Packaging an applet into a .cab file

This section describes how to use "in-place" packaging to build cabinet (.cab) files. These .cab files are a way to reduce download times and improve the end user's perception of the speed and utility of your Java applet.

When used for Java applets, the .cab file serves as a single, compressed repository for all .class files and all audio and image data required by the applet. Only the .cab file is downloaded, so the time of download is whatever it takes to negotiate the transfer and download the compressed bytes. Once downloaded, the system extracts and installs the contents of the .cab file.

In this example we are demonstrating how to create a .cab file that contains an applet written in Visual J++.

Open a Visual J++ project that implements an applet. This project should contain the following items:

Run the applet (by pressing F5) to ensure that it works.

To create a .cab file that contains the applet

  1. Select the Visual J++ project in the Project Explorer.
  2. Click the Project menu. Click Settings.
  3. In the Settings dialog box, click the Packaging tab.
  4. Select the Enable Packaging check box.
  5. Under Packaging Type, select Cabinet (.cab).
  6. In the File Name: box, type a file name for the .cab you want to create.
  7. Select the files you want to include in the .cab file. There are three ways to do this:
  8. Specify that all project outputs should be included in the .cab file,
    Specify that specific file types should be included in the .cab file,
    Select the specific files that should be included in the .cab file.

  9. Click OK.
  10. Build your project.

Visual J++ creates the .cab file in the project folder (unless you specify otherwise on the Packaging tab in the Settings dialog box.).

Deploying a Visual J++ project to the Web

In order to deploy a Visual J++ project to the Web, you must do two things:

To specify the outputs of a project in Visual J++

  1. Select the Visual J++ project in the Project Explorer.
  2. Click the Project menu and click Settings. This displays the settings for the Visual J++ project.
  3. In Settings dialog box, click the Outputs tab.
  4. Click Outputs of Type, and enter all the file types of the files that you want to be deployed. For example you might type "*.HTML; *.cab" to deploy just HTML pages and the .cab file you created.
  5. Click OK.

To specify the URL to which the project is to be deployed, you must create a deployment target.

To create a deployment target in Visual J++

  1. Click Project menu and click New Deployment Target.
  2. In the New Deployment Target dialog box, enter your target URL in the Deploy to (URL) box.
  3. Leave the timeout at 2 seconds, unless you are deploying over a dial-up connection, in which case you should increase this to 30 seconds.

  4. Select your project icon.
  5. Click OK.
  6. Once your server has been "pinged" by Visual J++, you see the Deployment Explorer, which displays a list of all known deployment targets. You can double click on the URL you just entered to see your project listed under the Web Content, Controls and Applets node. If it is not listed there, you can click Web Content, Controls and Applets, and then click the Project menu. Click Add Project Outputs and select your project.

  7. Select the deployment target node (which will be named Deploy to <your URL>), click the right-mouse button, and select Deploy from the right-mouse context menu. This deploys your HTML and .cab files to the specified URL.

Signing a .cab file

A .cab file can be digitally signed like an ActiveX Control. A digital signature provides accountability for software developers. The signature associates a software vendor's name with a given file. Visual J++ provides an easy mechanism to apply a digital signature to a .cab file.

Digital signatures create a path to you (through the company that authorized your certificate), in the event that your component causes harm on a user's system. You can incorporate your signature when you use the Setup wizard to create an Internet setup routine for your control component.

To sign a .cab file

  1. Select the Visual J++ project in the Project Explorer.
  2. Click the Project menu and click Settings. This displays the settings for the Visual J++ project.
  3. Click the Packaging tab on the Settings dialog box.
  4. Ensure that the Packaging Type is Cabinet (.cab).

  5. Click Advanced.
  6. Select the Sign Cabinet check box.
  7. If you have a personal certificate and private key, for example from Verisign, click on Use certificate file, then specify the certificate and private key file names.

  8. If you do not have a personal certificate, click Use test certificate.
  9. Click OK.

The next time you build the project and deploy, the Java applet classes will be put into a .cab file and signed.