Developer Zone
Register  |  Login

Visual MainWin for J2EE Version 2.0 Technology Preview 2


Thank you for trying the Visual MainWin for J2EE 2.0 Technology Preview 2 release. The latest preview delivers several new features and quality improvements over the first preview, which we released in September 2006. We'd like to get your feedback on the 2.0 Technology Preview 2 in order to improve the final release of our Visual MainWin 2.0 product suite, which will include the Developer, Enterprise, and Portal editions.

Please be advised that this is a preview release, and is not intended for commercial or production work. The preview release is not feature-complete; projects and additional user-data created with this release may not be compatible with future releases.

Mainsoft continues to work on Visual MainWin 2.0 to deliver the best .NET developer experience for creating J2EE applications from Visual Studio 2005. Mainsoft may post additional interim releases to through the spring, when the final Visual MainWin for J2EE 2.0 product suite will be available.

What's new?

What's new in Technology Preview 2 Service Pack 1?

The following reported Technology Preview 2 bugs have been fixed in this Service Pack:

  • 7250: Using WAR deployment method, deployer hang when the bin directory is included in the project
  • 7185: Generate a warning when there is no default language defined in web.config
  • 7360: Framework libraries XML and PDB files need to be removed from the package, to speed up debugger startup
  • 7176: Personal Web Site bundle sample - database attachement fails because of file permission
  • 7421: Uninstall crash when working without IIS
  • 7248: "Generate J2EE project" fails when relative path to the project contains spaces
  • 6878: DataSet.ReadXml() fills tables in different order than in DotNet
  • 7383: web.config pages directive not implemented
  • 7386: NullPointerException thrown when adding an existing connection string in web.config

What's new in Technology Preview 2?

The latest technology preview provides:

  • Feature complete ASP.NET 2.0 support, including new membership, roles, and profile providers based on IBM Cloudscape, a pure Java embedded database engine. It includes a Web Site Administration Tool (WSAT), which allows you to manage memberships and roles.


    ASP.NET 2.0 Web Parts are not supported in this preview release and are also not planned for the final Visual MainWin 2.0 release.

  • Debugger support: You can now debug your J2EE applications using the Visual Studio 2005 integrated debugger. Using the Visual Studio debugger windows, you can control the flow of execution of your J2EE application, set breakpoints, evaluate runtime expressions, and perform all tasks required to analyze your application runtime.

  • Several Visual Studio .NET integration improvements, notably a new deployment model into the J2EE application server that reduces deployment time during the code/build/run development cycle and simplifies the creation of a deployment package.

  • Additional .NET Framework 2.0 functionalities such as FTP and Mail.

  • Support for Visual Studio .NET 2005 Service Pack 1.

  • Visual MainWin for J2EE help is now integrated within Visual Studio .NET 2005 content collection and contains a draft version of the Visual MainWin 2.0 documentation.

Supported functionality

Following are the main features included in Visual MainWin 2.0 Technology Preview 2:

  • Visual Studio integration:

    • Creating new Visual MainWin C# console applications and class libraries.

    • Creating new Web applications and Web services for Tomcat.

    • Converting existing Visual Studio 2005 console applications, class libraries, Web applications, and Web services projects to J2EE.

    • Support for command-line builds via the MSBuild utility.

      To build your application via the MSBuild utility, you should do as follows:

      1. Add the .NET Framework directory to your PATH environment variable.

      2. Set the VMW_HOME environment variable to point to the Visual MainWin installation folder.

      Visual MainWin supplies a command prompt that sets these values, which can be found in the Visual MainWin for J2EE V2 program group.

  • Language features: Support for the C# 2.0 new language features, including specifically partial classes, iterators, yield, nullable types, anonymous methods, and generics.

  • Runtime: Partial support for .NET 2.0 Framework. ASP.NET is feature complete and has been tested through several integrative tests, including several ASP.NET Starter Kits. Low level functionalities, in the core, System, and XML are partially upgraded to 2.0 functionalities, while WebServices and ADO.NET are not yet upgraded in this preview release.

  • Deploying: Creating a deployment package as a WAR (Web Archive) file.

This release contains a ported version of the ASP.NET 2.0 Personal Web Site Starter Kit (available from that runs on Tomcat and leverages the Cloudscape-based membership and roles providers. We recommend that you check it and explore the demonstrated functionalities in this sample. Check the readme.txt file under <Visual MainWin_install_dir>\Samples\CS\pws for detailed information.

System requirements

These are the required software components:

  • Operating system: Windows XP SP2 or Windows 2003 Server


    Vista is not yet supported in this preview release.

  • Visual Studio .NET 2005 Service Pack 1, Standard or Professional editions

Installation instructions

The Visual MainWin 2.0 Technology Preview 2 may be downloaded from Mainsoft's Developer site. Run the executable file and follow the installation wizard instructions.

Upgrading from Visual MainWin 2.0 Preview 1 or 2

In order to install the Visual MainWin Technology Preview 2 Service Pack 1, you must first uninstall Visual MainWin Technology Preview 1 or 2.

Side-by-side installation

Visual MainWin 2.0 Technology Preview 2 supports installing Visual MainWin 1.x and Visual MainWin 2.0 on the same computer, which allows you to continue working with the latest 1.8 version while trying the 2.0 Technology Preview 2.

Technology Preview feature limitations

  • Visual Basic is not supported in this preview.

  • The Developer Edition is the only available edition.

  • The App_GlobalResources folder in an ASP.NET project is currently unsupported. Alternatively, you can include your .resx files as an Embedded Resource anywhere else inside your project.

  • Generics limitations: Generics are implemented using the Java 5 technique of type erasure. Many gaps between the .NET generics and the underlying Java generics have not been bridged. As a result, some limitations currently occur:

    • Generics can only be instantiated with class types (and not with structs or primitives), except for Nullable and KeyValuePair that can work with all types.

    • New Reflection methods for reflecting generic types do not work yet.

  • Upgrading projects created with previous versions of Visual MainWin is not supported. You must create a new Visual Studio 2005 project and manually add existing items and references.

Technology Preview known issues

  • The Convert to Web Application context menu item is not supported with this preview release. In order to convert an existing Web site to a Web application project, you must first convert the Web site to a .NET project and then use the Generate J2EE Project wizard to create the J2EE project.

  • Side-by-side installation works properly only when Visual MainWin 1.8 is installed prior to Visual MainWin 2.0.

  • Source code compatibility: When calling Java code directly from C#, code should use the .NET style for the System.Object methods instead of the Java style. For example, use ToString() instead of toString(). This is a change from previous versions of Visual MainWin.

  • The Add reference dialog shows reference tabs that are not relevant to Visual MainWin projects. The only relevant reference type is Project.

  • The app.config files for console applications should be renamed to <application_name>.jar.config.

  • As this preview does not support Visual Basic, you must make these changes to your ASP.NET projects:

    • Add this directive to your web.config files:

      <system.web><compilation defaultLanguage = "c#"/></system.web>
    • Make sure that none of your ASP.NET pages include the directive Language="vb".

      Having Language="vb" in your project's pages, will result in build errors such as the following:

      error JC3013: Unsupported Class Microsoft.VisualBasic.Devices.ServerComputer
      in My.MyComputer
  • Visual MainWin does not support CodeFile directives inside ASP.NET pages. As a workaround, remove such directives, and make sure that the Build Action property of the source file is set to Compile.
  • JDBC driver for SQL server 2005: Unlike with Visual MainWin 1.8, in Visual MainWin 2.0 Technology Preview 2, the default driver is the SQL Server 2005 driver, which is bundled with the installation. If you want to use the SQL Server 2000 driver, do the following:

    1. Download the JDBC driver and place it in the <Visual MainWin_install_dir>\jgac\jdbc folder.

    2. Update the application server.

    3. Add to your connection string: Provider=SQLJDBC2000.

Legal notices

Copyright 2002-2007 Mainsoft Corporation. All rights reserved.

Mainsoft, Mainwin, and Visual MainWin are trademarks or registered trademarks of Mainsoft Corporation in the United States and/or foreign countries. All trademarks, trade names, service marks, and logos referenced herein belong to their respective companies.

J2EE, Java, and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries.

Specifications subject to change without notice.


Limited Liability Statement

In no event will Mainsoft Corporation be liable for any loss of data; lost opportunity for profits; cost of cover; or special, incidental, consequential or indirect damages arising from the use of this software.


Mainsoft Corporation

226 Airport Parkway, Suite 250 San Jose CA 95110 USA

Phone: +1 (408) 200-4000

Fax: +1 (408) 200-4044



Home  Site map  Privacy statement  Legal notice  Contact us
Mainsoft Product Validations: Optimized for Microsoft Visual Studio, Java Powered for the Enterprise, and Ready for IBM WebSphere.
Read more about: .NET Java and .NET for Linux

Copyright © Mainsoft Corporation 2005-2009. All rights reserved