Working with Visual J#

Visual J# is a tool from Microsoft for developing web applications and web services in the .Net framework. This tool is aimed at the Java developers, so that they can develop applications using the Java syntax itself. You can get this tool from the Microsoft website in the form of Microsoft Visual J# .NET Redistributable Package. Java developers cannot use this tool to develop applications targeted at the Java Virtual Machine.

This tool has nothing to do with Java Virtual Machine. This package is developed by Microsoft and has not been endorsed by Sun Microsystems. To install this package, you need to have Visual Studio .Net installed in your computer. It is also recommended to have the .Net framework service pack installed in your system. If you have any previous versions or beta versions of Visual J# .Net installed in your system, you need to uninstall them using the Add/Remove programs in the Control Panel of your system, before installing your Visual J# .Net Redistributable package.

For successfully running Visual J#, you need to have Visual C# .Net or Visual Basic .Net installed in your system before installing Visual J# .Net. If you have installed Visual Studio .Net with the default options earlier, it would have included these tools for you. Hence there would not be any problem in using Visual J# .Net. If you uninstall Visual C# or Visual Basic .Net after installing Visual J# there might be unexpected errors while running this tool. During while running the setup program for installing Visual J#, it would detect the default language setting of Visual Studio .Net. Hence there is a need for you to start and close Visual Studio .Net at least once, so that the language settings could be detected by the Visual J# setup program while installing Visual J#. Installing Visual J# will associate this tool with file extensions like .java and .vjp. Uninstalling this tool would remove the association and you may not be able to open these files in Visual Studio .Net, from the Windows Explorer by double clicking these files.

Visual J# .Net has superior functionality for rapid design, development, and deployment of XML Web Services. It has form designers and visual controls for creating rich applications for the web and the desktop with stunning User Interfaces. You can also develop applications for the mobile devices. The ASP.Net mobile controls available helps you to create an application that can support 200 types of mobile devices. This tool provides the developers to use their existing knowledge in Java and C++ to develop state of the art enterprise applications using the .Net technologies.

Existing applications in Visual J++ can be easily migrated to Visual J# to work on the .Net platform and to add the new functionalities available in the .Net framework. Visual J# .Net provides tools for such migration from Visual J++. Using the Visual J++ migration tools available in Visual J#, you can migrate the existing applications in Visual J++ 6.0 to Visual J# .Net. This tools will easily migrate that Visual J++ application to the .Net framework. Visual J++ 6.0 and Visual J# .Net can co-exist in the same system as long as the system requirement is met. The Visual J++ migration tool is integrated in Visual Studio .Net. If a developer is willing to convert the actual Java code to the .Net technology, he can use the Java Language Conversion Assistant. This Java Language Conversion Assistant is used to convert your actual java code to Visual C#.

During migration of a project from there might be scenarios where you would like to use the resources of the java project. Hence there is a need for the conversion of these resources to the .Net framework. For this purpose, the .Net framework provides tools like vjsresgen.exe and resgen.exe. Both of these tools are used to convert a java resource into a .Net resource. Usually .Net resource files have the extension of .resource and in java, all the files except the .class files found in the directory mentioned in the classpath are resources. To use the java resource in your Visual J# project, you need to convert the java resouce in to a form where the resource file extension is .resx. After this conversion the .resx file is then converted to the .resource file that is used in the .Net framework.

The tool vjsresgen.exe is used to convert the java resources to the .resx format. Then the tool resgen.exe is used to convert the .resx file to the .resources file. This .resource file is then used in your Visual J# projects. The file format with the .resx extension is an xml resource format that is understood by the Visual Studio .Net IDE. Using Visual Studio .Net you can create and edit the .resx file. Visual Studio .Net can also convert this .resx to the .Net resource internally.

When you are upgrading a Visual J++ project to the Visual J# project using the migration tool that is provided in Visual Studio .Net, all the resources (files in .resource and .properties extension) of the Visual J++ project are converted to the .resx xml resource format for the .Net framework. When the project is built in Visual J#, these resource files are automatically converted to the .resource file by the Visual Studio .Net and added to the assembly. If your Visual J++ project has other resources like .txt and .gif files other than the .resource and .properties file, then these .txt and .gif files are not converted .resx format by the upgrade wizard. These files have to be manually converted to the .resx format. To manually convert them into the .resx format you have to perform the following steps:

1. Identify the project root and the resource files (like .txt and .gif files) and their location in the system.
2. Use the vjsresgen.exe tool to convert all the resource file to the .resx format.
· Consider that you are going to convert the .txt and .gif files to the .resx format.
· Convert them using the vjsresgen.exe tool as given below:
· If your project root is at c:\VJProj, then you can use the tool in the command line as c:\VJProj\>vjsresgen /out:projres.resx /recurse:*.txt /recurse:*.gif
· The command in the above step converts all the resources like .txt and .gif to the .resx format and the output file would be projres.resx as given in the command-line.
3. As a next step in the process you need to add the projres.resx file to the project. This addition of this resource to the project is done as given in the following steps.
4. Select the project in the Solution Explorer and right click.
5. In the context menu that appears, Select Add Existing Item.
6. Browse to the resource file projres.resx.
7. Click OK.

The above steps are used for converting the resources for projects built using the Visual J++ tool. For projects that are built using other tools, other than Visual J++, you have to perform the conversion in a different fashion as given below:

1. Create a new Visual J# project.
2. Drag and drop the project that is to be converted, to the project node in the Visual J# tool.
3. Convert the resource files of the project to the .resx format as given in the steps (step 2) for conversion for Visual J++ projects.
4. Add the newly created .resx file to the Visual J# project.
5. Build the application and debug if there is any bug in the application.

We find that Visual J# is an excellent tool that is used to migrate your existing projects and resources in found in Visual J++. It is an excellent tool for the Java developers to utilize their knowledge and expertise in Java and C++ in developing world class web applications and services, and desktop applications with rich interfaces using Visual J#.



“Amazon and the Amazon logo are trademarks of, Inc. or its affiliates.”

| Privacy Policy for | Disclosure | Contact |

Copyright - © 2004 - 2024 - All Rights Reserved.