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
  • 11,743
  • 10
  • 52
  • 81
Buddhi
  • 2,224
  • 5
  • 32
  • 43
  • 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
  • 398,270
  • 210
  • 566
  • 880
Iain
  • 2,500
  • 1
  • 20
  • 24
2

IKVM.NET Bytecode Compiler

Darin Dimitrov
  • 1,023,142
  • 271
  • 3,287
  • 2,928
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
  • 176,835
  • 32
  • 241
  • 292
1

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

Gordon
  • 4,823
  • 4
  • 38
  • 55
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,374
  • 4
  • 35
  • 48