Microsoft® Java Language Conversion Assistant 3.0 Beta
© 2003 Microsoft Corporation. All rights reserved.
Welcome to the Java Language Conversion Assistant 3.0 (JLCA) beta. JLCA helps you convert your Java-language projects to Visual C# and the .NET Framework. This document discusses the JLCA feature set, system requirements, and known issues in this release. 
1. Features
JLCA 3.0 converts most Java-language constructs, including the following:
•	Language: Java-language structures as defined by the Java Language Specification 2.0, as well as Microsoft Java language extensions.
•	Classes: Class declarations, inner and anonymous classes, as well as interfaces. Hiding, overriding, and overloading.
•	Methods: abstract, static, final, native, virtual, and synchronized methods.
•	Forms: WFC forms are converted to Windows Forms. Most AWT components are also converted to Windows Forms.
•	Java API usage: This release converts most of the Java APIs associated with J2EE 1.3 and JDK 1.3. It also converts calls to the Windows Foundation Classes. The specific packages covered by this release include the following:
com.ms.activex	com.ms.awt
com.ms.com	com.ms.directx
com.ms.dll	com.ms.dxmedia
com.ms.fx	com.ms.io
com.ms.jdbc.odbc	com.ms.lang
com.ms.mtx	com.ms.object
com.ms.ui	com.ms.util
com.ms.wfc	com.ms.wfc.app
com.ms.wfc.ax	com.ms.wfc.core
com.ms.wfc.data	com.ms.wfc.data.adodb
com.ms.wfc.data.dsl	com.ms.wfc.data.rds
com.ms.wfc.data.ui	com.ms.wfc.io
com.ms.wfc.ole32	com.ms.wfc.ui
com.ms.wfc.util	com.ms.wfc.win32
com.ms.win32	com.sun.image.codec
java.applet	java.awt
java.awt.color	java.awt.datatransfer
java.awt.dnd	java.awt.event
java.awt.font	java.awt.geom
java.awt.im	java.awt.image
java.awt.peer	java.awt.print
java.beans	java.io
java.lang	java.lang.ref
java.lang.reflect	java.math
java.net	java.rmi
java.security	java.sql
java.text	java.text.resources
java.util	java.util.cab
java.util.jar	java.util.zip
javax.accessibility	javax.activation
javax.crypto	javax.ejb
javax.jms	javax.mail
javax.naming	javax.rmi
javax.security	javax.servlet
javax.servlet.http	javax.servlet.jsp
javax.sound	javax.sql
javax.swing	javax.swing.beaninfo
javax.swing.border	javax.swing.colorchooser
javax.swing.event	javax.swing.filechooser
javax.swing.table	javax.swing.text
javax.swing.tree	javax.swing.undo
javax.transaction	javax.xml
org.w3c	org.xml
If your project contains references to Java APIs other than those listed above, the statements that use them are copied to Visual C# unchanged.
In addition, this release of JLCA contains the following documentation:
•	Conceptual topics on how to convert Java-language code to Visual C#.
•	Help for the Java Language Conversion Assistant wizard.
•	More than 12,000 topics that explain what to do with code that is not converted automatically.
2. Improvements over JLCA 2.0
This release contains the following improvements over JLCA 2.0:
•	Support for J2EE 1.3 and JDK 1.3.
•	Significant performance improvement for larger conversion projects.
•	Support for conversion of EJB, JAAS, JCE, JMS, JNDI, RMI, CORBA, and Swing applications.
•	Fixes to several bugs and omissions in JLCA 2.0.
3. System Requirements
The following are the system requirements for installation of JLCA 3.0:
Processor	Recommended: Pentium III-class, 500 MHz
RAM	Recommended: 256 MB
Available hard
disk space	200 MB
Operating
system	Recommended: Windows XP
Display	Recommended: High Color (16-bit)
Mouse	Microsoft mouse or compatible pointing device
Prerequisite
software	Microsoft Visual Studio .NET 2003
	Professional, Enterprise Developer,
	Enterprise Architect, or Academic
	- or -
	Microsoft Visual C# .NET 2003 Standard
with both Visual C# and  Java Language
Conversion Assistant 1.0 installed
Performance has not been tuned for minimum system configuration. Increasing your RAM above the recommended system configuration improves performance, especially when running multiple applications, working with large projects, or doing enterprise-level development. Conversion of very large projects can be very slow on systems with insufficient memory or processing speed. If you are converting large projects, make sure that your system is suitable for such conversions.
Microsoft Windows 2000 Datacenter Server is not a supported operating system.
This release is a beta and is intended for evaluation purposes only. There is no product support for this beta release. Before you install, confirm that your system meets the minimum requirements under System Requirements. Beta users may experience problems that could potentially result in loss, corruption, or destruction of existing data. This beta release is not appropriate for production use, and it is strongly recommended that you back up your existing data before you install and run this software.
This release is English-only and should not be installed on non-English versions of Visual Studio .NET 2003.
If you uninstall this beta release of JLCA 3.0, it also removes all previous versions of JLCA. To restore previous versions, you must reinstall them. To restore JLCA 1.0, you must reinstall Visual Studio .NET 2003.
4. Installing and Accessing Documentation
Java Language Conversion Assistant Help provides documentation linked from the error messages and warnings in projects converted with the Java Language Conversion Assistant (JLCA). The documentation must be installed separately from JLCA. If Visual Studio .NET and/or Visual Studio .NET Help are open when you install this documentation, you must close and reopen them to see this version of the JLCA documentation.
Once installed, JLCA Help is accessible from a separate entry in the table of contents in the Visual Studio .NET Help, but not from individual installed MSDN Libraries. If you have applied filters, select Visual C# or No filter to see the JLCA Help node in the table of contents. If you have installed any previous version of JLCA Help, projects that you converted with another version will still link to the documentation for that version.
To access Help from the table of contents:
•	On the Help menu, click Contents, and then click Java Language Conversion Assistant 3.0.
To access Help from the conversion report:
•	Expand any files with errors or warnings, and click the listed links.
To access Help from your converted code:
•	CTRL+click the underlined portion of the conversion comment.
Some conversion comments, such as those located in the HTML editor, are not links to Help. For these, copy and paste the portion in quotation marks in the Help Search box.
5. Known Issues
The following issues in this release are not covered in the documentation.
5.1. Members with no links to Help
A small number of members do not have links to Help in the conversion report or in your code. This applies to the following members:
•	java.awt.Textfield.addActionListener
•	java.awt.Textfield.removeActionListener
•	java.swing.JTextfield.addActionListener
•	java.swing.JTextfield.removeActionListener
•	com.ms.ui.UIComponent.setVisible
To see Help for these topics
1.	On the Visual Studio Help menu, click Contents.
2.	Select Java Language Conversion Assistant 3.0, and expand Converting Visual J++ and Java-Language Projects.
3.	Expand JLCA Diagnostic Messages Listed by Package.
4.	Select Java.awt Error Messages, Java.swing Error Messages, or Com.ms.ui Error Messages.
5.	Select the generic topic that applies, for example, java.awt.<ClassName>.add*Listener could not be converted.
5.2. Help correction: Property Switch
The following text replaces the Property Switch topic in the JLCA Help:
A command-line switch is provided so that you can choose whether to leave get/set/is methods as methods or convert them to properties. By default, JLCA converts these methods to properties. If you prefer, you can toggle the command-line switch and leave most of these as methods. For compatibility with other conversions, the following patterns are always converted to properties:
•	ActiveX methods are converted to specific properties in the .NET Framework.
•	CORBA attributes.
•	Accessor, mutator, and state-checking methods required by the .NET Framework.
•	Automatically generated .NET Framework properties.
5.3. Property switch issues
JSP pages that use the setProperty method with the property set to a wildcard character (*) are not converted correctly because the surrounding code expects a property, rather than a get/set method.
Taglib handler class properties are converted to get/set methods, and the code used in the generated ASPX page to set the property values will be broken because custom controls use properties to map to ASPX attributes in the custom HTML tags.
If an accessor method of a visual component is called in a different thread from the one that owns the component, it is converted to the System.Windows.Forms.Control.Invoke method, which returns an object type when the ProcessGetSetOff flag is turned off. The return value must be cast to the same type as the return value of the original method.
5.4. EJB issues
JLCA converts EJB projects into COM applications. If the EJB source file folder contains both a JAR file and a deployment descriptor Ejb-jar.xml file, two applications are generated in the converted project because the deployment descriptor included in the JAR file is also parsed.
When an EJB is converted, an attempt is made to assign a .NET transaction attribute to its serviced component. If different transaction attributes are assigned globally to the local and remote interfaces for one EJB, no .NET transaction attribute is assigned. Likewise, if one interface is globally assigned a transaction attribute and the other interface only has specific method assignments, no .NET transaction attribute is assigned. Specific method transaction attribute assignments are only used to determine the .NET transaction attribute if there are no global transation attribute assignments. Because .NET serviced components handle transaction attributes differently from the Java language, review the settings and make any necessary adjustments.
During conversion, default security checking is added, which might not be necessary in your project. If your Java-language source code sets security roles to specific methods or excludes certain methods, review the settings after conversion.
5.5. JNDI conversion
JNDI methods that typically support naming and directory services are converted to methods in the System.DirectoryServices namespace. Methods that typically support RMI and CORBA are converted to the System.Runtime.Remoting namespace. Since some methods can serve a dual purpose, some System.Runtime.Remoting methods may need to be changed to System.DirectoryServices methods in the converted code.
5.6. JSP pages with applets
Converted JSP pages that declare applets and use JSP scriptlets to set attributes in the generated OBJECT HTML tag cannot be opened in the Visual Studio designer. Use JavaScript to set the converted applet’s new OBJECT tag properties after the OBJECT tag declaration.
5.7. Transaction support class
If the DistributedConnectionSupport support class is included in the converted code to support transactions, a key pair must be generated. An AssemblyKeyFileAttribute statement must be added to the code to refer to this key pair. DistributedConnectionSupport objects are automatically registered when they are instantiated.
5.8. Limited support
Conversion of Java 2D applications is very limited because of differences between the Java 2D API and the classes of the System.Drawing namespace.
There is limited support for conversion of visual design code created in a J2SE integrated development environment.
5.9. DBCS in project names or virtual roots can create unreadable Csproj.webinfo files
If you specify a project name, VJP file name, or virtual root name which contains double-byte character set (DBCS) characters when converting a Web application, JLCA may generate a corrupted Csproj.webinfo file. This file cannot be read by Visual Studio .NET and will cause errors that prevent the converted application from being opened.
To repair a corrupted Csproj.webinfo file
1.	In Visual Studio .NET on the File menu, select Open.
2.	Select the corrupted Csproj.webinfo file, and click OK.
3.	On the File menu, select Save As.
4.	Click the arrow to the right of the Save button, and select Save with Encoding.
5.	Click Yes to resave the file.
6.	In the Encoding box, select Unicode (UTF-8 with signature) - Codepage 65001, and click OK.
The file can then be read properly.
5.10. Creating variables through actions is not supported
JLCA 3.0 does not support the conversion of tag library code that creates new variables through actions. If your code has such statements, they will be copied unchanged into the converted project. This applies to the following classes:
•	javax.servlet.jsp.tagext.PageData
•	javax.servlet.jsp.tagext.TagAttributeInfo
•	javax.servlet.jsp.tagext.TagData
•	javax.servlet.jsp.tagext.TagInfo
•	javax.servlet.jsp.tagext.TagLibraryinfo
•	javax.servlet.jsp.tagext.TagLibraryValidator
•	javax.servlet.jsp.tagext.TagVariableInfo
•	javax.servlet.jsp.tagext.VariableInfo