Wednesday, September 10, 2008

J#: Java on .NET (part III)

In addition to what I mentioned in the first two posts on this topic (part 1, part 2), I also discussed various other alternatives that are available as means for you to convert Java code to .NET. One such method is the use of the Java Language Conversion Assistant, JLCA which simply converts Java code to C#.NET. The JLCA tool is presently in version 3.0, and available for download from here. The JLCA tool version 3.0 comes with the capability to convert Java code upto J2SE and J2EE 1.3, which gives you a wide range of opportunity.

JLCA tool also has an associated companion, found in here, which gives you the capability to customize the way in which JLCA does language transformations. By doing so, you get the additional possibility to extend the capabilities of the tool to even support later Java versions according to your need. The tool also provides you with interactive assistance which guides you through the conversion process whilst providing you with valuable information on your legacy code base.

However, like J#, the JLCA tool also is now a discontinued product in terms of Microsoft's involvement in it. But, there are still several developers who are interested and working on the tool, who'd be ready to provide you with necessary help and support. The capabilities of JLCA is limited but ideally suits as a mechanism to convert legacy Java code .NET. Even though Microsoft seems to be quitting from the Java to .NET conversion sphere, there are other commercial tools available which are still continued.

The JNBridge is one such commercial tool that can be used to bridge your Java code into a .NET code base with least amount of effort. JNBridge comes with a number of advanced operations that make the life easy of developers who wish to migrate large Java code bases in to .NET. However, similar to its capability you need to pay a lot to get JNBridge. A single license can cost more than $1000 which is quite a big amount of money.

Therefore, J# still provides you with the necessary convenience of migrating legacy Java code in to .NET without much of a hassle and with the minimum investment. In addition to the information discussed in these three posts, which covers the presentation I did last Friday, we also discussed some important aspects during the QnA session.
  • I explained in the demonstration, that J# does not only recognize .jsl extensions but also the .java extensions. Therefore, converting a legacy Java code base only required you opening the existing Java source files inside VS2005 and then simply building it which will create a DLL for you which is now .NET compatible. Converting a legacy Java code base to .NET was left as a task for you to try out.
  • The Common Language Runtime (CLR) does not recognize Java Bytecode, and therefore the J# distribution also includes a JAR to DLL converter which can convert the .jar files to .dll files that are .NET compatible. This tool can be found inside your VS2005, or J# installation directory.
The complete presentation will be mailed to the Microsoft Student Champ (Sri Lanka) mailing list, and also will be made available as a part of the Student Champ Newsletter that we are hoping to make available by the end of September 2008. The presentation is also available in .pdf format in here.

No comments: