MicrosoftÒ Visual J# .NETÔ Beta 1 Readme

Introduction

Welcome to Beta 1 of Microsoft Visual J# .NET ™. Microsoft Visual J# .NET is a development tool that developers who are familiar with the java-language syntax can use to build applications and services on the .NET Framework. It integrates the java-language syntax into the Visual Studio .NET shell. Microsoft Visual J# .NET also supports the functionality found in VJ++ 6.0 including Microsoft extensions. Microsoft Visual J# .NET is not a tool for developing applications intended to run on a Java Virtual Machine. Applications and services built with Visual J# .NET will run only in the .NET Framework. Visual J# .NET has been independently developed by Microsoft. It is not endorsed or approved by Sun Microsystems, Inc. 

The Visual J# .NET Beta 1 can be installed and used on a machine that has Visual Studio .NET Beta2.

Getting Started

This Beta 1 release reflects the design of the final Visual J# .NET product, however a number of feature area details are still being refined. Consequently, development work you do with the Beta 1 release of Visual J# .NET might require changes to work with subsequent releases.

Visual J# .NET Beta 1 is designed for evaluation and education purposes on test equipment only. Creating and deploying production applications is neither supported nor recommended due to the pre-release status of the product. Installing to machines that you depend on for day-to-day operations either for yourself or for your business is strongly discouraged.

Related Readmes

In addition to this Visual J# .NET readme, there are related readme documents that are pertinent to usage of this product. The following list contains the names of related readme documents.

Content Name

File Name

Location

.NET Framework SDK

NA

http://go.microsoft.com/fwlink/?LinkID=501

Visual Studio .NET

readme.htm

Default location: [Drive letter where Visual Studio.NET is installed]:\Program Files\Microsoft Visual Studio.NET\

System Requirements

To use Microsoft Visual J# .NET Beta 1, you need:

1.      Microsoft Visual Studio .NET Beta2 (build 7.0.9254.0) English (US) version. Please see http://msdn.microsoft.com/vstudio/nextgen/sysreq.asp for system requirements.

2.      Windows 2000 Server or Professional, or Windows XP Professional RC Release.

Installation

Uninstalling previous versions

Warning: If you installed Visual Studio .NET Beta1 or PDC Technology Preview on your computer you must uninstall it before installing Visual Studio .NET Beta2. See Visual Studio .NET Beta2 readme for details on how to do this.

Installing Visual J# .NET Beta 1

Install Visual Studio .NET Beta2. For details on how to do this, see release notes accompanying Visual Studio .NET Beta2. This is also available from http://msdn.microsoft.com/vstudio/nextgen/beta2readme.exe

Install Visual J# .NET Beta 1:

1.      Download the exe file from the download page for Visual J# .NET Beta 1.

2.      Run the downloaded exe.

Also see the download page of Visual J# .NET Beta 1 for any late-breaking changes.

Uninstalling Visual J# .NET Beta 1

To uninstall Visual J# .NET Beta 1, use Add/Remove Programs from the Control Panel.

International Support

Visual J# .NET Beta 1 is available only in English (US) language version. This version will work correctly only on an installation of Visual Studio .NET Beta 2 with the default language set to English (US).

Note    If you have Visual Studio .NET Beta 2 installed with any language other than English (US) as the default language, Visual J# .NET Beta 1 setup will display a warning and terminate the setup. In order for setup to succeed, you have to set English (US) as the default language and run the setup program again.

To set English (US) as the default language:

(a) If you do not have English (US) version installed

Install Visual Studio .NET Beta 2 English (US) version. For installation instructions, refer release notes accompanying Visual Studio .NET Beta2. This is also available from http://msdn.microsoft.com/vstudio/nextgen/beta2readme.exe

(b) If you have more than one language version installed but English (US) is not the default language:

In Visual Studio .NET,

1.      Select Tools->Options menu item

2.      Select International Settings page in Environment folder

3.      Change Language to English (United States)

4.      Click OK to save your option.

Next time you restart Visual Studio .NET, the default language will be changed to English (US).

Providing Feedback

Please report all bugs you find in Visual J# .NET Beta 1. All your bug reports are valuable to us.  The newsgroup microsoft.public.dotnet.vjsharp has been created to receive your feedback. 

To view the public beta newsgroups, add a new server to your news reader. If you are using Outlook Express, you can have multiple servers listed in the left hand pane. To add a news server to Outlook Express:

1.      Open Outlook Express

2.      From the Tools menu, select Accounts.

3.      Select the Add button, and select News.

4.      Enter your name and address when prompted.

5.      On the NNTP News Server page, enter msnews.microsoft.com and do not check the option 'My news server requires me to log on'.

6.      Click Finish.

Note: if you are using the Internet in a corporate environment using a firewall, refer to your IT resources for server configuration via proxy.

Known Issues

Upgrading Visual J++ projects to Visual Studio .NET projects

1. Solutions with multiple projects, projects that are not upgraded are marked non-buildable.

In a Visual J++ solution with multiple projects, if the user says “No” to any project upgrade, the project is marked non-buildable in the upgraded Visual J# .NET solution. Even if the project is upgraded subsequently, the project remains marked non-buildable. This means that if you build the upgraded solution in Visual J# .NET, the project is not built. To change this, use the Build->Configuration Manager dialog to check the “Build” column for the project.

2. COM references are not automatically preserved in upgrade.

If a Visual J++ project has added COM wrappers to the project, these COM object references have to be added to the Visual J# .NET project manually using the Project->Add Reference menu item.

3. Visual J++ projects hosting ActiveX controls cannot be upgraded.

If ActiveX controls (OCXs) have been added to the Visual J++ project then these projects cannot be upgraded to Visual J# .NET. Visual J++ projects that host ActiveX controls can be opened in Visual J# .NET, but will fail to compile.

4. Visual J++ solutions upgraded to Visual J# .NET and re-opened in Visual J++ have an issue.

If Visual J# .NET is used to open Visual J++ solutions (.sln files), the user is prompted to upgrade the projects in the solution. If the user chooses not to upgrade, the .sln file remains unchanged, but a corresponding file with .suo extension is changed. If the solution is opened in Visual J++, pressing F5 to run the solution will cause jview to fail. This is because of the inconsistency between the .suo and .sln files. The workaround for this is to delete the .suo file from disk before opening the solution again in Visual J++.

The .suo file is a hidden file so you will normally not see it in Windows Explorer, or by listing the files using “dir” command in Command Prompt. However you can delete it using “del” command in Command Prompt. In Explorer, use Tools->Folder Options-> “show hidden files and folders” option to see the .suo file; then it can be deleted.

Editor

1.      Custom WebControl and Custom WindowsControl do not get added to Form the first time.

If you use Visual J# .NET to create a custom WindowsControl or WebControl and then drag and drop that control to the design surface in a Windows Forms project or Web Application project, the control will not added to the form. It needs to be dragged and dropped a second time for the custom Windows control to be added to the form.

Projects

1.      Cannot add reference to .exe files.

The Project->Add Reference action allows you to add reference to only libraries (.dll files). If you need to add reference to a project that creates an .exe file, e.g., a Console Application or Windows Application, rebuild that project as a Class Library project (by changing output type to Class Library) and then add the reference to the .dll file created.

2.      Visual J# .NET projects do not support adding resources to assemblies.

This version of Visual J# .NET does not support adding resources to binaries created using Visual J# .NET. If any resources have been added to the Visual J# .NET project, building the project will result in an error. If the application is required to use resources, resources can be stored in separate files and loaded using the .NET Frameworks classes System.Resources.ResourceReader and System.Resources.ResourceWriter. An alternative is to use the RESPATH environment variable as described in the online help.

3.      Adding existing Web Form (.aspx) is incorrectly setting the language to Visual Basic.

If a Web Form created using Visual J# .NET is added to a Visual J# .NET project using Project->Add Existing Item menu, the language for the code in the Web Form is incorrectly set to "vb" instead of "J#". To work around this, open the newly added file in HTML view, and change the first line to have language=”J#” instead of language=”vb”.

4.      Warning level setting is not honored for levels 2, 3, and 4.

The Beta 1 release of Visual J# .NET has only one warning level. However the project properties dialog allows you to set the warning level to 0, 1, 2, 3, or 4. Currently setting level 2, 3, or 4 has the same effect as setting warning level as 1. Setting warning level 0 turns off warnings – i.e., building the project does not issue any warnings.

 

Visual J# .NET compiler - jc.exe

1. Stack overflow error

Java-language programs run on Visual J# .NET throw the System.StackOverFlowException when a stack overflow occurs rather than java.lang.StackOverflowError.

2. Encoding format of source files

In the beta 1 release, jc.exe only supports compiling files saved with the following encoding schemes:

·          UTF8 (with signature)

·          Unicode Big Endian

·          Unicode Little Endian

·          The current System Code Page

J/Direct

1. Marshaling arrays of structs is not supported

Arrays of structures cannot currently be passed as arguments to native calls.

2. @dll.structmap elements of type=PTR cannot be marshaled

If a structure has an element marked with the @dll.structmap directive and specifying the type of the element as a pointer (type=PTR attribute), then the structure cannot be marshaled.

3. Passing polymorphic parameters is not supported.

The workaround is to overload the method with all the parameter types that can be used to invoke method. For more information on polymorphic parameters please refer to the Visual J++ 6.0 documentation in MSDN or the documentation in the Microsoft SDK for Java.

4. Output redirection

Redirecting the output of a Visual J# .NET program does not cause the output from any native code it calls into using J/Direct to be redirected.

Targeting .NET Frameworks

1. Throwing exceptions while inheriting from abstract classes written in other languages.

Visual J# .NET classes that inherit from abstract classes defined in other .NET languages cannot throw checked exceptions while implementing the abstract methods of the super class. This restriction does not apply when implementing interfaces that were defined in other languages.

2. Pseudo attributes are treated like normal attributes.

When pseudo attributes (attributes that cannot be queried via reflection) are attached to Visual J# .NET programs, jc.exe treats them like normal attributes. This might lead to runtime issues due to these attributes not being honored by the .NET Runtime. An example of a pseudo attribute is the System.Runtime.InteropServices.DllImportAttribute attribute used in making PInvoke calls. Attaching this attribute to a method that has an implementation passes compilation but may cause verification and runtime errors.

3. Unsupported assembly attributes

The following assembly attributes will have no effect when attached to assemblies in Visual J# .NET applications:

System.Runtime.CompilerServices.AssemblyOperatingSystemAttribute

System.Runtime.CompilerServices.AssemblyProcessorAttribute

System.Runtime.CompilerServices.AssemblyCultureAttribute

System.Runtime.CompilerServices.AssemblyVersionAttribute

System.Runtime.CompilerServices.AssemblyKeyFileAttribute

System.Runtime.CompilerServices.AssemblyKeyNameAttribute

System.Runtime.CompilerServices.AssemblyDelaySignAttribute

 

Visual J# .NET Binary Converter Tool - jbimp.exe

1. Jbimp cannot convert java-language/COM binaries to MSIL

jbimp.exe does not support the conversion of .class files containing @com attributes (java-language/COM binaries). When jbimp.exe is used on such binaries the conversion succeeds but the generated code can no longer interact with COM as they are treated like normal managed classes.

2. Support to convert binaries making J/Direct calls is minimal

Only basic support exists in jbimp.exe for conversion of .class files containing @dll attributes (binaries using J/Direct). This means that not all .class files containing these attributes can be successfully converted and run on the Visual J# .NET.

3. No support for @hidden and @security attributes

jbimp.exe also does not support @hidden and @security attributes in .class files. At conversion these attributes in the .class file are ignored by jbimp.

4. No support for binaries emitted by older compilers

In this release of Visual J# .NET, jbimp.exe only supports conversion of class files generated using jvc.exe shipped with Visual J++ 6.0. However, subsequent releases of this product will improve support for conversion of java-language bytecode generated using compilers from other vendors.

Class Library support

1. Support for Windows Foundation Classes (WFC) libraries

To build projects using WFC functionality, add the reference to the following two dlls to the project:

·          [Visual J# .NET install dir]\Framework\sdk\WFC.dll

·          [Visual J# .NET install dir]\Framework\sdk\com.ms.wfc.ILWrappers.dll

Without these dlls, the project cannot be built successfully.

The following WFC packages and classes are not supported in the Beta 1 release:

·          com.ms.wfc.html package and the com.ms.wfc.ui.HTMLControl class (Access to DHTML elements on a web page)

·          Classes related to hosting ActiveX controls in WFC forms

2. Collator related classes in the java.text package are not supported in the Beta 1 release

3. Some of the methods in the com.ms.lang.SystemX class are currently not implemented

The following methods in the com.ms.lang.SystemX class are currently not implemented:

getDefaultInputManager()

getInputManager()

setInputManager()

setKeyboardLanguage()

exitProcessAfterMainThreadReturns()

4. Return values of com.ms.dll.Dlllib.SizeOf() and com.ms.com.ComLib.jcdwSizeOf() are incompatible with Visual J++ 6.0.

The values returned by the methods com.ms.dll.Dlllib.SizeOf() and com.ms.com.ComLib.jcdwSizeOf() are not compatible with Visual J++. Unlike in Visual J++, the final size of native structs passed as parameters is not a multiple of 8. Programs that depend on size of the structures may not work as expected.

Other

1.      Manually generating proxy classes for Web Services.

If you add a Web Reference to Visual J# .NET projects, the appropriate proxy class for the Web Service is automatically generated and added to the project. However, if you want to create the proxy class manually using wsdl.exe, use the following syntax: wsdl.exe /l:"Microsoft.JSharp.JSharpCodeProvider, JSharpCodeProvider" <url or path of WSDL file>. For further information, see documentation on the tool wsdl.exe.

2.      Cannot call WebService methods using Enum types.

The Beta 1 release of Visual J# .NET does not support authoring Enum types. Hence, if a Visual J# .NET project has reference to a WebMethod having a parameter or return value of type Enum, the corresponding proxy class (autogenerated while adding reference to the webservice) needs to declare an Enum type, and this is not supported. Hence attempting to call this WebMethod will fail.

3.      Uninstalling Visual J++ after installing Visual J# .NET may remove associations for .sln and .java files.

Both products use the file extensions .sln and .java. To fix this, either repair/reinstall Visual J# .NET or use Tools->Folder options in Windows Explorer and choose 'File Types'  tab to associate the file extensions .sln and .java with devenv.exe. Devenv.exe is located in the directory [Visual Studio .NET installation directory]\Common7\IDE.

 

© Copyright 2001 Microsoft Corporation. All rights reserved.