Microsoft KB Archive/331670

From BetaArchive Wiki

Article ID: 331670

Article Last Modified on 5/17/2007



APPLIES TO

  • Microsoft Visual J++ 6.0 Standard Edition
  • Microsoft Visual J# .NET 2003 Standard Edition
  • Microsoft Visual J# .NET 2003 Standard Edition



This article was previously published under Q331670

SUMMARY

This step-by-step article describes how to upgrade a Visual J++ applet to a Visual J# .NET browser control. The Visual J# .NET Browser Control Utility provides the support that you need to upgrade Visual J++ applets to Visual J# .NET.

back to the top

More Information About Applets

An applet is a compiled, byte-code program that runs from a Web browser. When you open a Web page that contains an applet by using a Java-enabled browser, the browser downloads the byte code of the applet and runs the applet on a client computer. Visual J# .NET does not support applet development. Additionally, the Upgrade Wizard for your Visual J++ applet project does not provide a direct upgrade. However, you can upgrade the Visual J++ applet to a Visual J# .NET browser control.

back to the top

Upgrade the Visual J++ Project

  1. Open the Visual J++ applet project in Microsoft Visual Studio .NET. The Visual J# .NET Upgrade Wizard starts automatically.
  2. Follow the instructions in the Upgrade Wizard to convert the Visual J++ project to a Visual J# .NET Class Library project.
  3. Open the upgrade report to see if the Upgrade Wizard detected any issues during the upgrade.


Note The report states that applet projects are not supported. You can ignore this error. Fix any other issues that are listed in the upgrade report.

  1. Build the project. When you build the project, the output of the project is a managed library. Because Visual J# .NET applications work on managed libraries, applets are deployed to the server instead of to the byte-code (.class) files.

For more information about how to upgrade Visual J++ 6.0 project, visit the following Microsoft Developer Network (MSDN) Web site:

back to the top

Convert <APPLET> Tags to <OBJECT> Tags in HTML Pages

The Visual J# .NET Browser Control Utility does not support the <APPLET> tag. The Visual J# .NET Browser Control Utility uses the <OBJECT> tag to run Visual J# .NET browser controls that are hosted on Web pages. You must convert <APPLET> tags in all HTML pages to <OBJECT> tags.

The Visual J# .NET Browser Control Utility includes the HTML Applet to Object Tag Converter (TagConvert.exe) tool. The Visual J# .NET Browser Control Utility takes .htm or .html files as input and converts the <APPLET> tag to the <OBJECT> tag. The Visual J# .NET Browser Control Utility also backs up the original, applet-tagged HTML files with the .toolbak extension in the same directory.

Note TagConvert.exe is command-line tool. To use this tool, type the following command at a command prompt:

TagConvert [/restore] [/recurse] directory/filename


The recurse directory option recursively reads all HTML files from an input directory that you specify and converts <APPLET> tags to <OBJECT> tags. The restore filename option restores the <APPLET> tags from the original HTML file.

This tool is located in the %windir%\Microsoft.NET\Framework\v1.1.4322 directory. To convert <APPLET> tags in an HTML file, follow these steps:

  1. Open the Microsoft Visual Studio .NET command prompt.
  2. Change directories to the directory where the HTML page exists.
  3. Type the following command at the command prompt, and then press ENTER:

    TagConvert.exe HTMLFilename

back to the top

Deploy the Managed Library and the Updated HTML Pages

To deploy the managed library and the updated HTML files to the appropriate virtual directory on the Web server, make sure that the libraries are at the location that is listed in the HTML page. Additionally, make sure that you copy the resource files that are used in the Visual J# .NET Browser Control Utility (such as image, audio, or data files) to the corresponding locations.

back to the top

Security for Upgraded Visual J# .NET Browser Controls

When you upgrade a Java applet to a Visual J# .NET browser control, the control runs on the Microsoft .NET Framework with the permissions that the .NET Framework security policy grants on the computer. For example, when the control is run from a company intranet, the control runs under the security policy that applies to the intranet zone. When the control is run from the local computer, the control is run under full trust.

back to the top

REFERENCES

For more information about migrating Visual J++ applets, visit the following Microsoft Developer Network (MSDN) Web site:

Migrating Java Applets to Microsoft J# Browser Controls
http://msdn2.microsoft.com/en-us/library/aa290083(VS.71).aspx


back to the top


Additional query words: TagConvert utility J# Browser Control

Keywords: kbhowtomaster kbupgrade kbdll kbjava kbconvert kbhtml kbbrowse kbdeployment kbcontrol KB331670