kaushal
kaushal

Reputation: 117

Converting Java Services to .NET 4.0 Services (WCF )

We have to convert around 100+ services written in Java to .NET (C#) 4.0 . We are trying to estimate the efforts for this work. I am trying to find out if any tools are available for this conversion/ migration and any experiances of using these tools in real projects.

We need some pointer for evaluation of different possible ways of getting this job done.

  1. Any converter tools or check lists for conversion of Java services to WCF services
  2. With automation using the tools, how much of the codes gets converted ? Any stats like X % of the effort can be saved etc.
  3. What will be the quality of code generated ? We are looking for .NET/C# 4.0 with WCF
  4. Was the tool user friendly? How much learning curve?
  5. If any experiances of doing the conversion manually , then please share any guidelines used for conversion and any tips for doing effort estimation.

I have googled to find out a list of conversion tools available. Please share any Experience of using any of the following Java to .NET/ C# Conversion

Java Language Conversion Assistant 2.0 - Java Language Conversion Assistant is a tool that automatically converts existing Java-language code into Visual C#

Janett - Java to .Net Translator - Janett translates Java syntax, constructs and calls to Java libraries to C# / .Net counterparts.

CSharpJavaMerger Framework - Free and open source C# and Java conversion tool

Java 2 CSharp Translator for Eclipse - That tool makes it possible to automatic translate Eclipse java projects into Visual Studio projects. Generated code can be directly compiled and executed whitout any user modification.

Tangible Softwaresolutions - Not a free one but looks to be useful.

Sharpen - A guide to Sharpen - a great tool for converting Java to C# ( http://www.pauldb.me/post/14916717048/a-guide-to-sharpen-a-great-tool-for-converting-java )

Upvotes: 4

Views: 1692

Answers (1)

Anders Gustafsson
Anders Gustafsson

Reputation: 15981

Of the Java to C# converters listed in the comprehensive summary above, several projects have not been actively maintained for several years.

The two most promising projects are thus probably Tangible Software Solutions' commercial Java to C# Converter and the open-source alternative Sharpen (originally developed by Versant). Both these products do a fairly good job at converting Java to C# code, but in either case you should expect to have to do substantial manual reviewing and correction of the converted code.

Sharpen needs to be plugged-in to Eclipse, and there is also some manual pre-configuration involved to get the conversion running. Configuration is described in more detail here. The easiest way to get started with Sharpen is to obtain a prebuilt Eclipse plug-in from the NGit Github repository. Sharpen has been proven to do quite impressive conversion work; it is for example used in converting JGit to NGit. A Sharpen "on steriods" is also used to convert the Android/Dalvik JVM source code into C# in the XobotOS project. Unfortunately, the XobotOS Sharpen version is not easily applicable to other conversion projects.

I have also tried the Tangible demo converter and it seems to do a fairly good conversion job as well. In particular I appreciated the easy-to-use GUI with good conversion reporting. Another advantage is that it can be run standalone, i.e. there is no Eclipse or other IDE dependency. The product is also actively maintained (most recent release in July 2012) and with a commercial product you should also expect to have at least some technical support.

Whatever your choice, though, you have to be prepared for substantial code review and correction. My recommendation is that you start off by testing both these products on a few of the services subject to conversion to get a rough estimate of whether (semi-) automated Java-to-C# conversion is really worth the effort and investment.

Upvotes: 2

Related Questions