JLCA - Java Beans and benchmarks


Q.

Here are a few more questions

  1. Does JLCA support conversion of normal Java Beans?
  2. I am not quite sure what is the link between Java Beans and .net Style properties. As per my understanding: Get/Set methods of Java Beans will be converted to C# class properties. Is it correct? What about the other member methods for those Java Bean classes?
  3. What is the percentage reduction in effort when converting Java code using JLCA, compared to a scenario when the conversion is entirely manual? Are there any benchmarks that you can help us with?

Ans.

Here are the responses to the bove set of questions

  1. Yes, JLCA supports Java Beans – we convert these to .NET-style properties
  2. The Get/Set methods of Java Beans will be converted to C# class properties. The other methods would be converted as appropriate - JLCA allows the user to decide if he wants properties or the getter-setter syntax. By default the getter-setter conversion is enabled for JLCA. In case the user wants to convert appropriately to properties, the user can use the /ProcessGetSetOff Flag while conversion. This flag is not available from the JLCA Wizard but can be used if the conversion is being carried out from the command line. To access JLCA from the command line, the user may go to "<%SystemDrive%>\Program Files\Microsoft Visual Studio .NET 2003\JavaLanguageConversionAssistant" directory and execute JLCA using jconvert.exe.
  3. In terms of getting an exact percentage of converted code, your results will vary widely depending on the API’s your application uses. But it’s pretty easy to run the tool and you’ll get a report detailing the issues that weren’t automatically resolved. Please let the customer know that this report tends to be very sensitive – for example, the "toString" functionality in Java is almost always the same as the "ToString" equivalent in C#. But for the small percentage of the time that it is different, we flag the conversion to let the customer know that they should investigate.

Generally speaking our customers and our own tests indicate that the JLCA converts about 85-90% of your source code automatically. However, your results will vary widely depending on the type of application you have and what Java libraries you are using. I’ve done some conversions on smaller applications that work 100% correctly after running the JLCA. We’ve had other customers with millions of lines of source code who spend months refining their conversion. It all just depends and until you run it against your code and start analyzing the report it’s very hard to say.