2

Possible Duplicate:
Tool to convert java to c# code

I have done a project in java and I want to convert it to C#.Net. I'm using Visual Studio 2008. How can I convert the code from Java to C#? Are there any tools available?

StayOnTarget
  • 9,925
  • 10
  • 45
  • 68
Buddhi
  • 2,094
  • 5
  • 31
  • 41
  • Duplicate question - http://stackoverflow.com/questions/896867/tool-to-convert-java-to-c-code – Tangiest Dec 14 '09 at 14:04
  • Seems a shame to close this since it has more answers than the original. I'll come back and merge them later so these answers will live on. – Bill the Lizard Dec 14 '09 at 15:25

5 Answers5

7

There are tools that can help do this. For example this one from the team who created db4o:

Smart java to c# conversion for the masses with sharpen

Note that these are not perfect and some constructs and API's cannot be easily translated.

Bill the Lizard
  • 386,424
  • 207
  • 554
  • 861
Iain
  • 2,480
  • 1
  • 20
  • 24
2

IKVM.NET Bytecode Compiler

Darin Dimitrov
  • 994,864
  • 265
  • 3,241
  • 2,902
1

I think your best shot would be, unless you really really need all the code in C#, to use Visual J# and integrate your Java code with C#.

Pablo Santa Cruz
  • 170,119
  • 31
  • 233
  • 283
1

Here is an Msdn Article about converting from Java to Visual C#.

Gordon
  • 5,026
  • 4
  • 37
  • 53
0

Microsoft used to support their own .net implementation of the Java language, called Java#, but unfortunetelly they discontinued the project.

But at least you could try it to see if it could help you to convert your code to .net

Kico Lobo
  • 4,314
  • 4
  • 33
  • 48