tags:

views:

736

answers:

3

Are there any conversion tools for porting Visual J# code to C#?

+3  A: 

I've used the JLCA (Java Language Conversion Assistant) from Microsoft before. Worked well, but the last release was in 2004.

Jon Galloway
+10  A: 

Have you tried Reflector + FileGenerator to dump the compiled .NET library to C#. The only problem that I can see is that you are going to have a slight amount of clean up for J# specific references and no comments. But it should provide a good clean solution and get you 90% of the way.

Nick Berardi
+4  A: 

Nick mentioned Reflector + FileGenerator. That will kind of work. I've tried it and it works partially; but you still have to sift through the code and fix compiler errors, as Reflector doesn't do a perfect job.

JLCA is dead, last I heard. And if your project is J# (e.g. part .NET) it will stumble on .NET things. For example, if you've got any Windows Forms stuff in your J# project, JLCA will puke on it.

Overall, my suggestion would be use Reflector + FileGenerator, fix the compiler errors, and never look back at J#. :-)

Another interesting alternative is Mono's IKVM, which can run real Java on top of .NET. This would work if your J# code is all Java stuff and no .NET stuff or MS-specific Java.

Judah Himango
It's not really a Mono project so I would put the IKVM webpage:http://www.ikvm.net/
Kevin Driedger