Question : Need solution to convert Java 1.6 application into C# project

Hi,
I want to port my existing Java 1.6 application into C#. For this i did some research and found the following solutions
1. Using J# (only support java version upto 1.1.4)
2. JNBridge (Conversion make the application slow at run time)
3. JLCA(Java language conversion assistant)
Following are the drawbacks of each approach
1. Using J# : J# only support java version up to 1.1.4 and my application is build up in Java 1.6 so it couldn't be the best approach to work with.
2. JNBridge is a bit slow after conversion so it couldn't opt this approach.
3. JLCA: i started working on it but it also support java versions up to 1.3 but it is written some places that it can support up to java 1.5 so i am thinking that it can solve my problem.

Please  look at the above approach and let me suggest any suitable solution to convert my java 1.6 application in C#.

Thanks

Answer : Need solution to convert Java 1.6 application into C# project

Blindly converting from one language to another is a dangerous business.
The way objects or methods behave in one language can be quite different in another.

Let me show you what I mean by giving you one classic example; converting a VB6 project to VB.NET or C#.Net:

- In VB6 you declare a fixed-size array thus:
                         Dim numbers(5) As Integer

- in VB.NET you make the same declaration.
- in C# you would write:
             int[] numbers = new int[5];

Now here is the kick in the guts.
.NET does not support fixed sized arrays. The C# declaration will create an array of 5 integers, but if you try to add an element, it will grow to 6.
VB.NET is even worse. It is a broken language because it tries to be backwardly compatible with VB6.
In VB6 arrays start indexing from 1, but in .NET indexes start at zero. So what does VB.NET do, it has a bit each way, The above declaration would create an array of 6 elements (the five you declared plus one for the zero - how bloody broken is that?), and ohe yes, if you try to add elements to the array, it will hapily let you.

This is not a problem, unless your program code was operating on the assumption of fixed-size arrays, then things will start to break.

Anyway, you see my point about converting programs to another language?
You may find a program that will convert all your lines of code, but you will have to go back through each line of code and verify that its behaviour is as you expected.

So,
you say you want to convert a Java application to c#... how many lines of code are you talking about?
Whatever you do, don't fall into a false sense of security about your conversion program....Check! Check! Test! and retest.

Random Solutions  
 
programming4us programming4us