I have a couple of classes written in C #.

Is there a converter that translates these classes to Java?

In the class I have no third-party assemblies used, there is an indexer and certain operators +, -, ==. It is clear that in Java there is no operator overload, but they can also not be converted from C #, they can be omitted altogether.

UPD : Roughly speaking: the input converter is fed the .cs files, and it gives the output .java

  • how many file is there? this is not a problem to make handles, problems can only be with the initialization of the array, output to the console and some classes, if they are used at all, therefore correct yourself and everything should work. - Gorets
  • 2
    Handles do everything, handles. Moreover, a couple of classes to translate is not a problem. - Olter
  • That's the problem - classes of pieces 15 !!! I wrote this math library, I just thought of messing it up on Android - megacoder

2 answers 2

SOF Talk: C # code to Java code?

Tangible C # to Java Converter

  • Purely curious - but the opposite happens? - Maxim Kamalov
  • one
    It happens. - [Source Code Converters] [1] - [Java Language Conversion Assistant] [2] - great stuff [1]: tangiblesoftwaresolutions.com [2]: microsoft.com/download/en/… - mantigatos
  • Thank you, @mantigatos, excellent links, for sure somewhere useful))) - Maxim Kamalov

.NET Java Interop Solutions

It is a Visual Studio-based SDK and a Java-enabled platforms.

  • Not exactly what I wanted. - megacoder
  • MSIL compiler in JVM bytecode. What did you want? - falstaf
  • Source Converter, not a compilation, but a conversion. So that I convert the .cs files with the implemented logic in C # into the .java files with the same logic and can then compile them, modify them, etc. - megacoder