My question in a nutshell: I have a non-trivial Java application that I want to port to .Net. I also want to keep on developing and maintaining the application on both platforms. What tools, methods and strategies are suitable for this?
I should provide some more context. The application is a GUI intensive J2ME program. We need to convert the application to compact .Net, target platform is windows mobile smartphones.
The application uses low level graphics operations, persistence, threading etc. In other words, some code is tightly coupled with the Java/J2ME API. This part of the application is currently being refactored away behind interfaces and factories in order to reduce coupling with the rest of the code. In any case, these services will be written and maintained manually on both platforms.
Once this is done we are still left with a significant amount of java business logic. These classes are fairly easy to convert to equivalent C# code, either manually or by using Microsofts wizard-based conversion app ("Java Language Converstion Application", JLCA). Both of these approaches do however entail a fair bit of constant manual labour, as we want to keep developing business logic in Java first and then continually port it to the .Net platform.
Now, the ideal solution would be an automated environment to enable us to do one of the following:
A) compile the Java classes directly into something that the compact .Net framework can run and access as normal C# classes.
or B) generate C# classes from the Java code, then build and deploy as normal .Net code.
So: Do anyone of you have any experience with similar situations? What tools and methods are useful (and in active use) for doing this?
I've converted a couple Java apps to C#. I was hopeful that the JLCA would make things easy, but in reality it just seemed to make the code more difficult to manage and messy. In the end we opted for a manual conversion. After all, if you know Java you can pick up C# pretty quickly.